# DateObject ambiguous string interpretation?

I try to enter the following input, but receive an error message:

DateObject["12/1/2016", DateFormat -> {"Month", "/", "Day", "/", "Year"}]


despite having specified the date format explicitly, Mathematica is complaining about ambiguity of day and month ordering. I presume there is something wrong with the syntax I use. How should I be entering this command properly?

## 1 Answer

You've got DateFormat option the wrong way around: it controls output, not input.

What you want to do is actually the following (with day calendar granularity):

DateObject[{"12/1/2016", {"Month", "/", "Day", "/", "Year"}}, "Day"]