Quick Search:
 
 Oracle PL/SQL: TIMESTAMP: LocalTimestamp Jump to:  
Category: >> Oracle PL/SQL >> TIMESTAMP: LocalTimestamp  

<< lastnext >>

Snippet Name: TIMESTAMP: LocalTimestamp

Description: The localtimestamp function returns the current date and time in the time zone of the current SQL session as set by the ALTER SESSION command. It returns a TIMESTAMP value.

A similar function to the localtimestamp function is the current_timestamp function. The difference between these two functions is that the localtimestamp function returns a TIMESTAMP value while the current_timestamp function returns a TIMESTAMP WITH TIME ZONE value.

Also see:
» FUNCTIONS: date/time
» TIMESTAMP: TZ_OFFSET
» TIMESTAMP: TRUNC
» TIMESTAMP: SysTimeStamp
» TIMESTAMP: SYS_EXTRACT_UTC
» TIMESTAMP: SessionTimeZone
» TIMESTAMP: FROM_TZ
» TIMESTAMP: EXTRACT
» TIMESTAMP: DUMP
» TIMESTAMP: DBTIMEZONE
» TIMESTAMP: Get current timestamp
» TIMESTAMP: List time zones

Comment: (none)

Language: PL/SQL
Highlight Mode: PHP
Last Modified: March 04th, 2009

localtimestamp
 
-- IF the following ALTER SESSION command was issued:
 
    ALTER SESSION SET TIME_ZONE = '-7:0';
 
-- and then the following SQL statement was then executed:
 
    select localtimestamp
    from dual;
 
-- you might get the following result:
 
    10-Sep-05 10.58.24 PM
 


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org