1
Reply

function for date assigning

satheesh babu

satheesh babu

Jan 8 2009 4:40 AM
2.3k
Hi all,

here i want a function for variables fromdate and todate.

i am passing month and year as parameters for function and i want to return fromdate,todate from that function as

if i pass month as 01 & year as 2009 then i want fromdate as "01/01/2009" and todate as "31/01/2009"

if i pass month as 02 & year as 2012 then i want fromdate as "01/02/2012" and todate as "29/02/2012" means it need to check leap year also

if i pass month as 04 & year as 2009 then i want fromdate as "01/04/2009" and todate as "30/02/2009"

please give me some code for this

thank you...


Answers (1)