Hi,
version 11.2.0.3
Have following varchar2 column which get from separate system and want to store it as date in our system.
2020-01-30T12:56:41.0000000
Using below
TO_DATE (substr(regexp_replace(EVENT_TIMESTAMP,'T|.0000000',''),1,18) , 'YYYY-MM-DDHH24:MI:SS') EVENT_TIMESTAMP
works
However not sure why getting message date format picture ends before converting entire input string ORA-01830 as length 18.
TO_DATE (regexp_replace(EVENT_TIMESTAMP,'T|.0000000','') , 'YYYY-MM-DDHH24:MI:SS') EVENT_TIMESTAMP1 -- gives ORA-01830 error
Also is there a tidier/less verbose way to translate this string to a date?
We have no control of data being received.
Thanks