Gee guys, mine was 4 lines. I think the request was for the 'shortest'... :-)
Now, who's gonna put all these routines through a speed test to find out which is the most efficient? Me, I'm going back to watching Kull the conqueror.... -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Thursday, June 02, 2005 7:46 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Finding last day of month In a message dated 6/2/05 7:07:42 PM Pacific Daylight Time, [EMAIL PROTECTED] writes: << 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 >> Before I get jumped on, there is an error in the above Input Date ; * format yyyymmdd Middleofthismonth = date[1,6]:'15' I.Middle = Iconv(Middleofthismonth,'D') Should be changed to Input Date ; * format yyyymmdd Middleofthismonth = date[5,2]:'-15-':date[1,4] I.Middle = Iconv(Middleofthismonth,'D') and then NextMonth = Oconv(Iconv(date[1,6]:'15','D') + 30,'D2') should be changed to NextMonth = Oconv(Iconv(date[5,2]:'-15-':date[1,4], 'D') + 30,'D2') Will Johnson Fast Forward Technologies ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/