Identify the time zone from a timestamp column

Database

Identify the time zone from a timestamp column

Greetings All,

I have a requirement to identify the time zone of a record (from a time stamp or date column) from existing populated table.  Can you please help me on this.

Tags (2)
5 REPLIES

Re: Identify the time zone from a timestamp column

Maybe this can help you, the last line. I did not try it.:

http://www.info.teradata.com/htmlpubs/DB_TTU_14_10/index.html#page/Connectivity/B035_2509_082K/2509c...

SELECT EXTRACT (TIMEZONE_HOUR FROM TIME '12:13:14+07:00')

EXTRACt(TIMEZONE_HOUR FROM yourdate AT LOCAL ) ,EXTRACt(TIMEZONE_MINUTE FROM yourdate AT LOCAL),EXTRACt(TIMEZONE_HOUR FROM yourdate) .....

from your tbl1

Re: Identify the time zone from a timestamp column

Thank you Raja,

To be clear, we have a table on a server on which the records are inserted from different countries which have different time zone, I need to find what are all the records that are inserted by specific country (time zone).

I believe all the records are converted to time zone of the server while inserting.

Re: Identify the time zone from a timestamp column

Whaw!!!! I am at a loss :): Just my thought

How is your table DDL?Are you in touch with the DBA if he can help you maybe with Dbs control settings ,.....?  help session may/ not help you you much, if you know different zones.

Re: Identify the time zone from a timestamp column

Hi Raja,

The column is defined as "timestamp with time zone"  Also, is there any possibility to find the same information from only a timestamp column.

Re: Identify the time zone from a timestamp column

Time zone..my thought:

How is the set up?Creating a user with time zone, DBA's setting of dbscontrol, setting at session level(local,user, set interval..)

what do you get when you do:

select cast(current_timestamp as CHAR(35));

You can talk to the DBA.