I would like to convert a string to a datetime format with the following formula:
TO_DATE('2018-01-03 00:00:00.', FORMAT('%Y-%m-%d %H:%M:%S'))
However, this is limited to accepting seconds as the finest gradient of formating according to the documentation. Is anyone aware of a %... Identifier for milliseconds?
A workaround that works for me is:
ADD_MILLIS ( TO_DATE('2018-01-03 00:00:00.', FORMAT('%Y-%m-%d %H:%M:%S')), 100)
Though being a lot less elegant and I would have to split a column into its milliseconds and subsequently join them again. A native solution would be the preferred option.
Kind Regards,
Maurits