Doesn't work for me :( Tried on UD 7.1.6 and UD 6.0.12. It works for December, but I changed it to March and it gave me January 3rd.
UniData does have a nice function LAST_DAY(x) for using in virtual attributes to return the last day of the month for the date passed to it. hth Colin Calgary, Canada -----Original Message----- From: Wjhonson Thanks to everyone who responded This is with what I ended up MONTH = OCONV(DATE(),'DM') ; YEAR = OCONV(DATE(),'DY') IF MONTH = 12 THEN MONTH = 1 ; YEAR += 1 ELSE MONTH += 1 FIRST.OF.MONTH = ICONV(MONTH:"/01/":YEAR,'D') END.OF.MONTH.DATE = FIRST.OF.MONTH-1 The only point of line 3 is for clarity so the next programmer doesn't stare at this for ten minutes going WTH? You could combine 3 and 4 into a single line END.OF.MONTH.DATE = ICONV(MONTH:'/01/':YEAR,'D')-1 _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users