OpenersNotesSection(Spacer1)Details

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Interpret dates with time:

Interpreter["StructuredDateTime"]["2010/12/15 13:30:00"]

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

Restrict the value to be within a given range:

Interpreter[Restricted["StructuredDateTime", {(DateObject["Wed 15 Dec 2010 13:30:00", DateObject[{2010,12,15},TimeObject[{13,30,0.`}]]]),(DateObject["Wed 15 Dec 2010 13:30:00", DateObject[{2010,12,15},TimeObject[{13,30,0.`}]]])+Quantity[2,"Day"]}]]["2010/12/16 00:00:00"]

Set a resolution of seconds:

Interpreter[Restricted["StructuredDateTime", {-Infinity,Now,"Second"}]]["2013/03/09 21:11:00"]

Pure dates or pure times are not accepted:

Interpreter["StructuredDateTime"]["1989/12/03"]

Interpreter["StructuredDateTime"]["20:25:13"]

Specify a custom format:

Interpreter["StructuredDateTime",DateFormat->{"Day","-","Month","-","Year","@","Hour",":","Minute"}]["9-3-2013 @ 9:10"]

({{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])}, {Related Interpreter Types:  (RefLink[DateTime, paclet:ref/interpreter/DateTime])  ▪  (RefLink[ComputedDateTime, paclet:ref/interpreter/ComputedDateTime])  ▪  (RefLink[Time, paclet:ref/interpreter/Time])  ▪  (RefLink[Date, paclet:ref/interpreter/Date])  ▪  (RefLink[TimeZone, paclet:ref/interpreter/TimeZone])  ▪  (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[StructuredDate, paclet:ref/interpreter/StructuredDate])  ▪  (RefLink[ComputedDate, paclet:ref/interpreter/ComputedDate])  ▪  (RefLink[ComputedTimeZone, paclet:ref/interpreter/ComputedTimeZone])}})}})

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