If you add 1 to the end of the month, shouldn't you get the last day of the next month?

set var AsOfDate date = 6/30/2008

R>show var asofdate
06/30/2008

R>set var NextDate date = (addmon(.AsOfDate,1))

R>show var nextdate
07/30/2008                     shouldn't I have gotten 7/31/2008?

or

set var PrevDate = (addmon(.AsOfDate,-1))

R>show var prevdate
05/30/2008             or should this be 5/31/2008

What I want is the beginning of the month date, instead I get
set var PrevDate = (addmon(.AsOfDate,-1)+1)

R>show var prevdate
05/31/2008


Bernie Lis

Reply via email to