by Lennart <Erik.Lennart.Jonsson@[EMAIL PROTECTED]
>
May 6, 2008 at 03:11 PM
On May 6, 10:56 pm, JAW <jwill...@[EMAIL PROTECTED]
> wrote:
> I need to get the first day of the previous month in a query.
>
> I thought CURRENT DATE and DAYOFMONTH would allow me to da it but it
> is noe
>
> WHERE DTXL >= 1st day of previous month
>
> Anyone got a good idea?
I'm not familiar with DB2 for Z/OS but do you mean something like:
[lelle@[EMAIL PROTECTED]
db2 "values current_date - 1 month -
day(current_date) days + 1 day"
1
----------
04/01/2008
1 record(s) selected.
/Lennart