Hello I have this query to get the first day of the month :
select concat( REPLACE(TRUNC(to_date(CURRENT_DATE, 'dd-mm-yyyy'), 'mm') ,TO_CHAR(CURRENT_DATE, 'yy'), ''),TO_CHAR(CURRENT_DATE, 'yyyy')) from dual
But when I execute it SQL DEVELOPER I got error ORA-01830
And when I execute it on toad I got the good result : '01-FEB-2020'
How can I do to be worked on these two environnement
Thanks
Is there any reason for doing a simple thing in such a complex manner? The result you need is
select trunc(current_date, 'mm') from dual;
By the way, current_date
is a function that returns date
so TO_DATE
-ing it is wrong.