I've noticed a discrepant behaviour between Interpreter and DateList when parsing dates:

DateList[{"2018-11-20 17:04:53.629000", {"Year", "-", "Month", "-", 
   "Day", " ", "Hour", ":", "Minute", ":", "SecondExact"}}]
  DateFormat -> {"Year", "-", "Month", "-", "Day", " ", "Hour", ":", 
    "Minute", ":", "SecondExact"}]["2018-11-20 17:04:53.629000"]
Failure[InterpretationFailure,<|MessageTemplate:>Interpreter::datetimeformat,MessageParameters-><|Format->2019-12-31 00:00:00.000,Input->{2018-11-20 17:04:53.629000}|>,Format->{Year,-,Month,-,Day, ,Hour,:,Minute,:,SecondExact},Input->{2018-11-20 17:04:53.629000},Type->DateTime|>]

Is this normal or a bug in Mathematica?

In particular, I encountered the issue when trying to specify a structured date format within SemanticImport.

This is using Mathematica 12.0.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.