I want to convert the follow string to date:
2004-09-30 23:53:48,140000000
I tried:
to_date('#', 'YYYY-MM-DD HH24:MI:SS,FF9')
But PL/SQL keep throwing this error:
ORA-01821: date format not recognized.
FF9 is incorrect for Oracle, any suggestion?
Oracle
stores only the fractions up to second in aDATE
field.Use
TIMESTAMP
instead:, possibly casting it to a
DATE
then:I don't think you can use fractional seconds with to_date or the DATE type in Oracle. I think you need to_timestamp which returns a TIMESTAMP type.