| Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
Functions, 62 of 166
localtimestamp::=
localtimestamp
The LOCALTIMESTAMP function returns the current date and time in the session time zone in a value of datatype TIMESTAMP. The difference between this function and CURRENT_TIMESTAMP is that LOCALTIMESTAMP returns a TIMESTAMP value while CURRENT_TIMESTAMP returns a TIMESTAMP WITH TIME ZONE value.
This example illustrates the difference between LOCALTIMESTAMP and CURRENT_TIMESTAMP:
ALTER SESSION SET TIME_ZONE = '-5:00'; SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL; CURRENT_TIMESTAMP LOCALTIMESTAMP ------------------------------------------------------------------- 04-APR-00 01.27.18.999220 PM -05:00 04-APR-00 01.27.19 PM ALTER SESSION SET TIME_ZONE = '-8:00'; SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL; CURRENT_TIMESTAMP LOCALTIMESTAMP ----------------------------------- ------------------------------ 04-APR-00 10.27.45.132474 AM -08:00 04-APR-00 10.27.451 AM
|
|
![]() Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|