oracle first day of month code example
Example 1: oracle sql first day of month
-- First day of month
SELECT TRUNC(sysdate, 'MONTH') from dual;
Example 2: oracle last day of month
-- Last day of current month
SELECT trim(to_date(last_day(sysdate), 'DD/MM/YYYY')) AS LASTDAY FROM DUAL;
Example 3: oracle sql first day of year
-- Oracle: First day of year
SELECT TRUNC(sysdate, 'YEAR') from dual;