Changing timezone of a timestamp field

Asked By 20 points N/A Posted on -
qa-featured

Hi

I am working as a database administrator.

I have less experience on this field.

I want to ask like how we can change time zone of a timestamp field.

Please explain.

Thank you

SHARE
Answered By 0 points N/A #101465

Changing timezone of a timestamp field

qa-featured

Query to insert data into a Time Stamp field

SQL> INSERT INTO table_dt VALUES(3, TIMESTAMP '2003-01-01 00:00:00 US/Pacific');

Query to Alter a Time Zone of a session.

SQl> ALTER SESSION SET TIME_ZONE='-7:00';
Query to update the Time Zone of a Field WITH PRIMARY KEY(ID)=000
SQl> UPDATE TABLE XYZ SET T_ZONE= TIMESTAMP '2003-01-01 00:00:00 US/Pacific' WHERE ID=000;
Details of Time Stamp and Zone are given Below.
TIMESTAMP Datatype

The TIMESTAMP datatype is an extension of the DATE datatype.

Specify Syntax

TIMESTAMP [(fraction_second_precision)]

fraction_second_precision is optional

Specify the TIMESTAMP literal in a format

TIMESTAMP 'YYYY-MM-DD HH24:MI:SS.FF'

TIMESTAMP WITH TIME ZONE Datatype

TIMESTAMP [(fraction_second_precision)] WITH TIME ZONE

fraction_second_precision is optional and specifies the number of digits in the fractional part of the SECOND date time field.

Login/Register to Answer

Related Questions