ASDATE parsing Query with format Jan 21, 2021 @ 20:34:54.000
Hello,
I am trying to parse the following String to a DATE
Jan 21, 2021 @ 20:34:54.000
I am using the following method and could not get to work, it gives me an error. would you be able to help advice how I should do it?
1. Use REPLACE to delete the @
2. Use ASDATE(#column; "MMM dd, yyyy HH:mm:ss:SSS")
thanks,
Anson
-
Hello Anson.
The ASDATE function should recognize the original with the pattern MMM dd, yyyy @ HH:mm:ss.SSSASDATE("Jan 21, 2021 @ 20:34:54.000"; "MMM dd, yyyy @ HH:mm:ss.SSS")
There are two possible reasons why your approach throws the error:
- A semicolon instead of a dot as the separator between seconds and milliseconds.
- Absence of the second space between years and hours. If you simply deleted @ with the REPLACE function, spaces that surrounded it are intact and you should consider them in the pattern for the ASDATE .
I hope this helps.
Please sign in to leave a comment.
Comments
1 comment