Tuesday, May 10, 2016

How to find the first day of a month

By using the format string MM to extract the month, and then using the DAY format to return the first day of the month within the date , it is possible to find first day of a month:


select
   to_char(
      trunc(:p_date,'MM'),'DAY'
       )
from dual;

No comments:

Post a Comment