The SQL code to get the first day of the current year using Oracle SQL:
1 2 | SELECT TRUNC(SYSDATE, 'YEAR' ) FROM DUAL; |
The SQL code to get the first day of the current month using Oracle SQL:
1 2 | SELECT TRUNC(SYSDATE, 'MON' ) FROM DUAL; |
Current year (extract from SYSDATE) using Oracle SQL:
1 2 | SELECT EXTRACT( YEAR FROM SYSDATE) AS YearNumber FROM DUAL; |
Get the first Monday in the following Month using Oracle SQL:
1 2 | SELECT NEXT_DAY(LAST_DAY(SYSDATE + 1), 'MONDAY' ) FROM DUAL; |