OpenersNotesSection(Spacer1)Details

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Interpret dates:

Interpreter["StructuredDate"]["2010/11/25"]

Interpreter["StructuredDate"]["1999/09/09"]

Restrict the value to be within a given range:

Interpreter[Restricted["StructuredDate", {(DateObject["Fri 12 Nov 2010", DateObject[{2010,11,12}]]),(DateObject["Fri 12 Nov 2010", DateObject[{2010,11,12}]])+Quantity[1,"Week"]}]]["2010/11/15"]

Use a different format:

Interpreter["StructuredDate"]["2015 apr 11"]

Interpreter["StructuredDate"]["1945-04-25"]

Specify a custom date format:

Interpreter["StructuredDate",DateFormat->{"Day","/","Month",",","Year"}]["2/12, 2015"]

Specify multiple accepted formats in a list:

Interpreter["StructuredDate",DateFormat->{{"Month","/","Day",",","Year"},{"Day","/","Month","/","Year"}}]["2/12, 2015"]

No semantic interpretation of the year is allowed; "10" is interpreted as "10 AD", not "2010":

Interpreter["StructuredDate"]["10/11/12"]

Dates that involve a time are not accepted:

Interpreter["StructuredDate"]["1999/09/09 09:09"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Interpreter, paclet:ref/Interpreter])  ▪  (RefLink[SemanticImport, paclet:ref/SemanticImport])  ▪  (RefLink[Restricted, paclet:ref/Restricted])  ▪  (RefLink[Failure, paclet:ref/Failure])  ▪  (RefLink[DateObject, paclet:ref/DateObject])  ▪  (RefLink[TimeObject, paclet:ref/TimeObject])  ▪  (RefLink[DateList, paclet:ref/DateList])}, {Related Interpreter Types:  (RefLink[Date, paclet:ref/interpreter/Date])  ▪  (RefLink[ComputedDate, paclet:ref/interpreter/ComputedDate])  ▪  (RefLink[Time, paclet:ref/interpreter/Time])  ▪  (RefLink[DateTime, paclet:ref/interpreter/DateTime])  ▪  (RefLink[UnixTime, paclet:ref/interpreter/UnixTime])  ▪  (RefLink[ExcelDate, paclet:ref/interpreter/ExcelDate])  ▪  (RefLink[DayOfWeek, paclet:ref/interpreter/DayOfWeek])  ▪  (RefLink[StructuredTime, paclet:ref/interpreter/StructuredTime])  ▪  (RefLink[ComputedTime, paclet:ref/interpreter/ComputedTime])  ▪  (RefLink[StructuredDateTime, paclet:ref/interpreter/StructuredDateTime])  ▪  (RefLink[ComputedDateTime, paclet:ref/interpreter/ComputedDateTime])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Setting Up Input Interpreters, paclet:guide/InterpretingStrings])}})}})