System Date for prior month ending date

Hi,

I created a system date for last month and it works fine. Here is the select statement that i am using for system date for the last month

DATE(DAYS(CURDATE())-DAYOFMONTH(CURDATE()))

I need to create another object for Prior Month Ending Date.

What is the formula that i need to create for the Prior Month Ending date?

My database is AS400 DB2.

Thanks,
Raju


Rajua99 :india: (BOB member since 2004-12-16)

I think this will hellp:
CURRENT DATE - DAY(CURRENT DATE) DAYS


priyanka1410 :uk: (BOB member since 2007-01-13)

Using this Select statement i was able to make it work

DATE(DAYS(CURDATE())-DAYOFMONTH(CURDATE()))-1MONTH

Thanks
Raju


Rajua99 :india: (BOB member since 2004-12-16)