Q:

Oracle SQL - Using SysDate to create a specific date

I need to automate a report that will always the first day of the current month and year in the WHERE caluses.
"YYYY-MM-01"
I am trying to achieve the following but sadly, I can't get anything to work using To_Char/ To_Date/SysDate.
    to_date(SYSDATE('YYYY-MM') + '-01', 'yyyy-mm-dd')

Thank you

A:

To get the first day of the current month (as a DATE), simply:
trunc(sysdate,'MON')

or, formatted:
to_char(trunc(sysdate,'MON'),'yyyy-mm-dd')

