Re: Last day of month..
Posted in 1998
June Tong — — source: Informix-list mailing list archive (1991-1998)
Rudolf Fernandes wrote: >In SQL, you could use the following > >SELECT > DAY(MDY( MONTH(MDY(MONTH(your_date),1,YEAR(your_date))+32) , 1, > YEAR(MDY(MONTH(your_date),1,YEAR(your_date))+32) ) - 1) >FROM systables >WHERE TABNAME = 'systables'; > > >Explanation : > >1. mdy(month(your_date), 1, year(your_date)) + 32 > always takes you into the next month Not if you're on the last day of a month. Then this will take you forward two months. Also if you're on the 30th of any month besides July and December, or on the 28th or 29th of January. No, I don't think this method is going to work. June -- june_t@hotmail.com Lost in the wilds of Palo Alto, living on Peanut M&M's