Avatar of angel7170
angel7170
Flag for United States of America

asked on 

Convert Gregorian Date to timestamp in Oracle

Hello,

I am trying to convert a Gregorian date format to regular timestamp in Oracle SQL. Also, I need that time to account for Daylight savings time. Here is syntax I used but using NEW_TIME cuts the milleseconds from the timestamp. How can I account for millesonds and still do the DST. Please assist. Thank you

Actual Column (Assign Time) : 2015-05-27T17:07:12.065Z
Expected Result: 5/27/2015 12:07:12.065000000 PM
Received outcome using New_time: 5/27/2015 12:07:12 PM


NEW_TIME (
             TO_TIMESTAMP (z."PXASSIGNDATETIME",
                           'yyyy-mm-dd"T"hh24:mi:ss.FF"Z"'),
             'GMT',
             'EDT'),
Oracle Database

Avatar of undefined
Last Comment
Sean Stuber

8/22/2022 - Mon