I have a string containing date and time in the following format:
date_string = "1991-03-11 08:45:15.3"
I am not able to figure out how to specify the format. I have tried 'yyyy-MM-dd HH:mm:SS' and 'yyyy-MM-dd HH:mm:SSS' and various other combinations, but I keep getting this error:
ERROR: Error using datetime (line 616) Unable to parse '1991-03-11 08:45:15.3' as a date/time using the format 'yyyy-MM-dd HH:mm:SS'.
How can I convert this string into a "datetime" object?
Best Answer