Parse date time with fractional seconds (less than milliseconds) and time zone offset
I'm trying to parse dates from a CSV file but can't make it work (either directly in the Read CSV operator, or in a Nominal to Date operator).
A sample date is 2017-04-01 00:41:20.999 +00:00
I tried the following format, as well as variations removing the quotes:
'yyyy-MM-dd' 'HH:mm:ss.SSS' 'Z'
I looked at https://docs.rapidminer.com/studio/operators/blending/attributes/types/nominal_to_date.html and http://community.rapidminer.com/t5/RapidMiner-Studio-Knowledge-Base/Sample-formats-for-Date-Parsing/ta-p/37031 and this seems to be the correct format according to these references.
I get an error saying "Unparseable date: '2017-04-01 00:41:20.999 +00:00'".
Where is my error?
Also, the dates I need to parse have in fact 7 fractional second digits (2017-04-01 00:41:20.9992222 +00:00). I worked around this by using a regex to keep only the first 3 digits, but would there be a format I can use for this? (similar to using "HH:mm:ss.fffffff" in .Net)
Answers
Hi Christos -
The quick solution is to remove the colon ":" from the timezone nominal date. Here is a process to look at. The top part is your nominal date converted (without colon); the bottom part is just showing you a timestamp going back and forth between nominal and date formats.
Scott
seems like a valid point to me. I'm moving your message to the "Ideas" section so that the dev team can follow up. Thanks for the feedback!
Scott