Ok smartass you say let's see you do it ....

First of all, you can always get from the month you are in, to the next month 
by simply add 30 days to the middle of the month.  And you never need to 
worry about leap years nor about 12th month logic

Input Date ; * format yyyymmdd
Middleofthismonth = date[1,6]:'15'
I.Middle = Iconv(Middleofthismonth,'D')
I.Next = I.Middle + 30
NextMonth = Oconv(I.NEXT,'D2-')
FirstDayNextMonth = NextMonth[1,2]:'01':NextMonth[5,2]
I.FirstDay = Iconv(FirstDayNextMonth,'D')
I.LastDayPreviousMonth = I.FirstDay - 1

Now can we scrunch this down?
Input Date ; *format yyyymmdd
NextMonth = Oconv(Iconv(date[1,6]:'15','D') + 30,'D2')
I.LastDayPreviousMonth = Iconv(NextMonth[1,2]:'01':NextMonth[5,2],'D') + 1

Do I win the big stuffed pickle?
Will Johnson
Fast Forward Technologies
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to