Timestamp-Related Functions : Introduction « Date Timestamp Functions « Oracle PL/SQL Tutorial






FunctionDescription
CURRENT_TIMESTAMP()Returns a TIMESTAMP WITH TIME ZONE containing the current session time along with the session time zone.
EXTRACT({ YEAR | MONTH | DAY | HOUR | MINUTE | SECOND } | { TIMEZONE_HOUR | TIMEZONE_MINUTE } | { TIMEZONE_REGION | } TIMEZONE_ABBR ) FROM x)Extracts and returns a year, month, day, hour, minute, second, or time zone from x; x may be one of the timestamp types or a DATE.
FROM_TZ(x, time_zone)Converts the TIMESTAMP x and time zone specified by time_zone to a TIMESTAMP WITH TIMEZONE.
LOCALTIMESTAMP()Returns a TIMESTAMP containing the current time in the session time zone.
SYSTIMESTAMP()Returns a TIMESTAMP WITH TIME ZONE containing the current database time along with the database time zone.
SYS_EXTRACT_UTC(x)Converts the TIMESTAMP WITH TIMEZONE x to a TIMESTAMP containing the date and time in UTC.
TO_TIMESTAMP(x, [format])Converts the string x to a TIMESTAMP. You may also specify an optional format for x.
TO_TIMESTAMP_TZ(x, [format])Converts the string x to a TIMESTAMP WITH TIMEZONE. You may also specify an optional format for x.










13.1.Introduction
13.1.1.Using Datetime Functions
13.1.2.Timestamp-Related Functions
13.1.3.Time Interval Related Functions
13.1.4.Date Functions
13.1.5.LAST_DAY, TO_CHAR, TO_DATE
13.1.6.select date '1954-08-11' + 10000 as 10,000 days
13.1.7.Differences Between Dates