• 0

Oracle - SQL - First day of the current month


Question

Hello,

 

I am trying to generate an automated SQL Report that will always use the current first day of the month. Format: 'YYYY-MM-01'

 

Sadly I dont have the ability to create functions on the database and I do not know how else I can make this work. I saw "SYSDATE()" but I am not familiar with this enough to get it working.

 

Thank you

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

It's been a loooong time since I touched Oracle, so possibly it's changed since, but this should work if I remember correctly...

 

SELECT TO_CHAR(TRUNC(SYSDATE,'MM'),'YYYY-MON-DD HH24:MI') FROM dual;
Link to comment
Share on other sites

This topic is now closed to further replies.