DATE - First and Last day of a month

Von Tobias Arnhold 1.29.2015
Simple task and simple solution:
-- First day: 
select TRUNC(sysdate,'MON') as first_day from dual
-- Alternative:
select TO_DATE('01.'||TO_CHAR(SYSDATE,'MM.YYYY'),'DD.MM.YYYY') as first_day from dual
-- Last day: 
select LAST_DAY(TRUNC(SYSDATE)) as last_day from dual
Use in APEX as computation for an empty field:

Post Tags: