Skip to Main Content

SQL & PL/SQL

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!

Help in converting date with time zone in character format to date

834888Feb 27 2019 — edited Feb 28 2019

I need help in converting '2019-02-19 17:00:59 MST' to date format '2/19/2019 5:00:59 PM'.

I tried doing this but got 'Date format not recognized' error:  select to_date('2019-02-19 17:00:59 MST', 'YYYY-MM-DD HH24:MI:SS MST')  from dual;

Basically I was trying to read from a source which is in Varchar2 column and insert into a target table with a date column. I can use substr to cut MST from the source string and then use to_date, but want to check if there is any other way.

Please help. Thanks.

Comments
Post Details
Added on Feb 27 2019
3 comments
1,320 views