Quick Search:
 
 The Oracle PL/SQL LOCALTIMESTAMP Function      [Return To Index] Jump to:  

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 |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org