Hi All,
I've seen all the previous discussions about finding the first day of the month using sysdate but I'm trying to get the same first day of the month from the user input but not able to do so. Request you to help me out.
Queries Used:
First day of the current month
select to_char(trunc(sysdate,'MM'),'DAY') from dual;
The above query is working fine
But my query is not working
select to_char(trunc(&asysdate,'MM'),'DAY') from dual;
select to_char(trunc(to_date(&asysdate),'MM'),'DAY') from dual;
I passed 01-JAN-21 as input but got the below error
ORA-00904: "JAN": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 1 Column: 25
Thanks,
Chandhan