Sorry,
pressed the key too soon:
If you have your timestamp strings in a fixed-length format, you can do something like:
SELECT CAST(SUBSTR(THE_TS_STRING,1,18) ||
SUBSTR(THE_TS_STRING, 29,3) AS TIMESTAMP(0) FORMAT 'DD-MMM-YYbhh.mi.ssbT') THE_TIMESTAMP
FROM (SELECT '05-mar-12 01.33.34.000000000 pm' THE_TS_STRING) PRE;
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
THE_TIMESTAMP
---------------------
05-Mar-12 01.33.34 PM
HTH
Cheers.
Carlos.
↧