patbrooks6
(Patrick Brooks)
1
Can someone help explain this error occurring with some string dates and not with other?
There are a number of strings where I get this response
FromDateString["12/11/2023"]
FromDateString::ambig: Warning: the interpretation of the string 12/11/2023 as a date is ambiguous.
For others like “12/12/2023” or “4/15/2023” a Dateobject is returned without a message
What do I need to do differently?
Thanks
Pat
patbrooks6
(Patrick Brooks)
2
I think I figured it out. The ambiguity was Mathematica not knowing which part of the string was a month and which part of the string was a day.
Once I specified {“Month”, “/”, “Day”,“/”,"Year} the error was cleared.
In Italy, “12/11/2023” means the 12th of november. In the US they have the bizarre custom of reading it as the 11th of december.