How to find the first date of a month from a given datetime dataset (in SQL Oracle)?

Viewed 38

Does any in-built function exists for that please?

I've created this one;

to_char( add_months( ( last_day( sysdate ) + 1 ), -1 ), 'dd/mm/yyyy' )

Thanks in advance. Chri$

1 Answers

You can use TRUNC() with a date format argument:

select trunc(sysdate, 'MON') from dual

Related