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!

Convert JSON timestamp to Oracle date format

anasaziiMay 22 2018 — edited May 23 2018

I have a Varchar2 field which represents a timestamp brought in from JSON.  What is the best way for me to convert this so it is a 'readable' Oracle time? 

I'm sure this is not difficult but I'm not sure what the respective format options would need to be that I would use.

An example that I have is '2018-04-11T05:26:29.505+00:00'.

What would be the to_date I need to have that store as '11-APR-2018 05:26:29'? Do I need to strip out the 'T' and '+00:00' (time zone) first?

Also sometimes the same field has no +00:00 but a Z.  Do I need to be concerned about that?

thanks,
Janel

This post has been answered by Paulzip on May 22 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2018
Added on May 22 2018
16 comments
5,822 views