Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert to UTC Zone from EST and EDT

S567Nov 26 2019 — edited Nov 26 2019

DB Version is 11g.

Hello Expert's,

I am creating this new thread as my prior request was bit different,I would be really thankful if you provide guidance on this.

I have a table with two columns and there are in varchar2.

Column1 has data like this '10/15/2019 09:41 AM EDT'  and Column 2   has data like '10/22/2019 3p EST' ,however these are referring to date and time in two different timezones but their datatype is varchar2.

Now on top this table im creating a view and requirement is the two different timezone should be converted  to there  equivalent UTC with format YYYY-MM- DDTHH :MM:SS.

Test Data -

select '10/15/2019 09:41 AM EDT' col1_value , '10/22/2019 3p EST' col2_value from dual

when i tried in my local which is in EST  i was able to convert to equivalent UTC with below query

select to_char(systimestamp,'yyyy-mm-dd"T"hh24:mi:ss') local,to_char(sys_extract_utc(systimestamp),'yyyy-mm-dd"T"hh24:mi:ss') utc from dual;

Atleast if i am able to convert the my column values  to systimestamp format then using above i can convert to UTC.

Thanks.

Comments
Post Details
Added on Nov 26 2019
2 comments
1,742 views