Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL LOCALTIMESTAMP Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: LOCALTIMESTAMP

Definition:
The Oracle PL/SQL LOCALTIMESTAMP function is used to get current date and time values in the current session, irrespective of the time zone. It returns a TIMESTAMP data type.

Notes:

  1. The difference between LOCALTIMESTAMP and CURRENT_TIMESTAMP is Time Zone. LOCALTIMESTAMP returns a TIMESTAMP value while CURRENT_TIMESTAMP returns a TIMESTAMP WITH TIME ZONE value.
  2. An optional integer argument precision may be specified to determine the fractional second precision of the time value. The default value is 6.
  3. If you use the LOCALTIMESTAMP with a format mask, take care that the format mask matches the value returned by the function.
  4. Be aware that the Time Zone of the current SQL session may be set with the ALTER_SESSION command. The results from LOCALTIMESTAMP may not be as expected if the ALTER_SESSION command has been applied without taking into account that it has been used.

Example Usage:

SELECT LOCALTIMESTAMP FROM/ DUAL;

LOCALTIMESTAMP
------------------------------
04-DEC-10 03.41.451 AM


Related Links:

Related Code Snippets:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 220 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?