Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: TIMESTAMP: LocalTimestamp Jump to:  
Category: >> Oracle PL/SQL >> TIMESTAMP: LocalTimestamp Bookmark and Share

<< 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
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 140 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?