Difference between LOCALTIMESTAMP and CURRENT_TIMESTAMP in oracle

By Santhosh N

This explains the difference between two oracle date functions namely LOCALTIMESTAMP and CURRENT_TIMESTAMP.

Oracle Date function, LOCALTIMESTAMP returns only timestamp value where as the function CURRENT_TIMESTAMP will return TimeStamp With Time Zone value.

Syntax 1: LOCALTIMESTAMP
Syntax 2: CURRENT_TIMESTAMP

Ex1: SELECT LOCALTIMESTAMP from DUAL;
This returns something like ‘5/18/2010 3:29:31.814809 AM’

Ex2: SELECT CURRENT_TIMESTAMP from DUAL;
This returns something like ‘5/18/2010 3:28:26.458148 AM -07:00’

Note: The value returned will be changed based on the alter session command issued for the session.

Related FAQs

This explains how to get the current date and time in the time zone of the current SQL session which is set by the Alter session command.
This explains how to convert the timestamp value to the timestamp with time zone in oracle.
This explains how to get the Database Time zone information that is set to the current session.
This explains how to get the current date and time along with the time zone that is set for the session.
This explains how to get the current date along with the time that is set for the session.
This explains how to get the last day of the month from the specified date in oracle
Difference between LOCALTIMESTAMP and CURRENT_TIMESTAMP in oracle  (3062 Views)