Kayshav.com
About Developer Oracle 11g Technology Information Sitemap

Oracle Timestamp

SELECT
 TO_CHAR(SYSTIMESTAMP, 'mm/dd/YYYY HH24:MI:SSxFF') AS ts_date,
 TO_CHAR(SYSTIMESTAMP, 'mm/dd/YYYY HH24:MI:SSxFF TZH:TZM') AS ts_tz_date,
 FROM_TZ(CAST(TO_DATE(20010101093501,'yyyymmddhh24miss') AS TIMESTAMP)
        ), 'America/New_York')
        AT TIME ZONE 'America/Los_Angeles' AS 'West Coast Time',
 FROM_TZ(CAST(SYSDATE AS TIMESTAMP),  'America/New_York')
        AT TIME ZONE 'UTC'  AS 'Date-Time UTC',
 EXTRACT(SECOND FROM SYSTIMESTAMP) AS ts_sec,
 EXTRACT(MINUTE FROM SYSTIMESTAMP) AS ts_min,
 EXTRACT(HOUR   FROM SYSTIMESTAMP) AS ts_hour,
 EXTRACT(DAY    FROM SYSTIMESTAMP) AS ts_day,
 EXTRACT(MONTH  FROM SYSTIMESTAMP) AS ts_month,
 EXTRACT(YEAR   FROM SYSTIMESTAMP) AS ts_year,
 EXTRACT(TIMEZONE_HOUR   FROM SYSTIMESTAMP) AS time_zone_hr,
 EXTRACT(TIMEZONE_MINUTE FROM SYSTIMESTAMP) AS time_zone_min,
 EXTRACT(TIMEZONE_ABBR   FROM SYSTIMESTAMP) AS time_zone_abbr,
 EXTRACT(TIMEZONE_REGION FROM SYSTIMESTAMP) AS time_zone_region
FROM DUAL;




Oracle - TimeZone Queries

Oracle - Functions

Oracle 11gXEr2 - Index

Oracle registered trademark of Oracle Corporation.

Last Revised On: March 24th, 2015

  39908