Date and Time Function
Date and Time Function
1.SYSDATE
SYSDATE
22-AUG-25
2.CURRENT_DATE
Returns the current date and time in the session time zone.
CURRENT_DATE
22-AUG-25
3.SYSTIMESTAMP
Returns the current date and time including fractional seconds and time zone.
SYSTIMESTAMP
22-AUG-25 12.45.48.289000 PM +05:30
4.TO_DATE
TO_DATE('2025-08-22','YYYY-MM-DD')
22-AUG-25
5.TO_CHAR
TO_CHAR(SYSDATE,'DD-MON-YYYYHH24:MI:SS')
22-AUG-2025 12:47:22
ADD_MONTHS(SYSDATE,3)
22-NOV-25
7. EXTRACT
EXTRACT(YEARFROMSYSDATE)
2025
8.LAST_DAY
Returns the last day of the month that contains the date.
Syntax – LAST_DAY(date)
LAST_DAY('22/AUG/2025')
31-AUG-25
9. NEXT_DAY
Returns the date of the first day of the specified name that is later than the date
supplied.
NEXT_DAY('22/AUG/2025','TUESDAY')
26-AUG-25