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.
Maybe this can help you, the last line. I did not try it.:
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
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.
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.
The column is defined as "timestamp with time zone" Also, is there any possibility to find the same information from only 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.