Code
-- Add_months (A, B)
- From date a plus month B
Select Add_months (sysdate, 5 ) From Dual;
-- to_date (STR, Format)
- time when string-type STR is converted to format
select to_date ( ' 2008-08-01 ' , ' YYYY-MM-DD hh24: MI: SS ' ) from dual;
-- to_char (date, Format)
- convert datetime data to a format string
select to_char (sysdate, ' YYYY-MM-DD hh24: MI: SS ' ) from dual;
-- Add a year to the current date
select sysdate + interval ' 1 ' year from dual
-- Add the current date to April 1, January
select sysdate + interval ' 1 ' month from dual
-- Add one day to the current time
select sysdate + interval ' 1 ' day from dual
-- Add one hour to the current time
select sysdate + interval ' 1 ' hour from dual
-- Add one minute to the current time
select sysdate + interval ' 1 ' minute from dual
-- Add one second to the current time
select sysdate + interval ' 1 ' second from dual
-- trunc (date, 'mm ')
- return the first date of the month of the date.
select trunc (sysdate, ' mm ' ) from dual
-- trunc (date, 'yy ')
-- return the first day of the year where the date is located
select trunc (sysdate, ' YY ' ) from dual