Replies: 2 comments 1 reply
-
Furthermore, here are some examples of
It seems I may misinterpret the types and their interaction behind this operations? |
Beta Was this translation helpful? Give feedback.
-
If I replace |
Beta Was this translation helpful? Give feedback.
-
Dear All,
I tested some date-related examples, below are some that did not work. Could you check if this is expected or a bug?
SELECT '2022-10-22 10:11:12'.asDateTime()
-- worksSELECT date('2022-10-22 10:11:12.000','yyyy-MM-dd HH:mm:ss.SSS')
-- works (but milliseconds are not returned)SELECT date('2022-10-22 10:11:12','yyyy-mm-dd')
-- fails (Text '2022-10-22 10:11:12' could not be parsed, unparsed text found at index 10)SELECT '2022-10-22 10:11:12.001'.asDateTime()
-- fails (Text '2022-10-22 10:11:12.001' could not be parsed, unparsed text found at index 19)SELECT '2022-10-22T10:11:12'.asDateTime()
-- fails (Text '2022-10-22T10:11:12' could not be parsed at index 10)SELECT '2022-10-22 10:11:12'.asDate()
-- fails (Text '2022-10-22 10:11:12' could not be parsed, unparsed text found at index 10)SELECT '2022-10-22'.asDate()
-- fails (Text '2022-10-22' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 2022-10-22 of type java.time.format.Parsed)Thank you
Beta Was this translation helpful? Give feedback.
All reactions