Re: Last day of month..
Posted in 1998
Something like this (in 4gl): DEFINE pv_date DATE # passed date (say 12/14/98) DEFINE lv_eom DATE # local working date / final result: End of Month (12/31/98) LET lv_eom = MONTH(TODAY),"/01/",YEAR(TODAY) # sets first day this month (12/1/98) LET lv_eom = lv_eom + 35 # somewhere in next month (01/04/98) LET lv_eom = MONTH(lv_eom),"/01/",YEAR(lv_eom) # first day next month (01/01/98) LET lv_eom = lv_eom - 1 # one day earlier is end of month for pv_date (12/31/98) RETURN lv_eom There is probably a better way, and my code probably has some mistake, but the general idea is that the first day of the next month less one is the end of the month for any date. Dave Killough SUNIL S. SINGH wrote in message <6u2o5c$bmr$1@news.xmission.com>... > > >Hi All !! > >Is there any function or technique to find last day of month >ie 29 or 28 or 30 or 31 for a particular date(dd/mm/yy) > >Any Help IS appreciated ... > >Thanks. >Sunil > >