Skip to content
Advertisement

how to get the 1st day of the year sql query oracle

I need a sql query to get a 1st day of the 1st month of the year which i am passing.

ex: If i am passing 2021, my output should be 01-JAN-2021 If i am passing 2020, my output should be 01-JAN-2020

Advertisement

Answer

Assuming you are passing the year as the bind variable :year then:

or

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement