Re: Last day of the month??
Posted in 1996
rnatesan@bactc.com (Ramki Natesan) wrote: >Hi, > Is there any Informix lib function to get last day of the > month? or how do get that? could someone help? > >Thanks in advance. > >-Ramki Here's a function to help you: function lastDayOfMonth(aDate) define aDate date, aMonth smallint let aMonth = month(aDate) if aMonth = 12 then # December let aDate = mdy(12,31,year(aDate)) else # First day of next month less 1 = last day of month let aDate = mdy(aMonth+1,1,year(aDate)) - 1 end if return aDate end function Catalin ========================================================================= Catalin Badea _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/ _/ _/ _/_/ _/ Senior Technical Architect _/ _/_/ _/ _/_/_/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ Tecsys Inc. _/ _/_/_/ _/_/_/ _/_/_/ _/ _/_/_/ ===== cat@tecsys.com =========== include system "disclaimer.4gh" ===== == http://www.virtualmarketplace.com/LEVEL3/ITEC/TECSYSE/TECSYSE.HP ===