"Date" (Interpreter Type)
"Date" (Interpreter Type)
Date in any standard format or in natural language.
Details
- "Date" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "Date" requires connectivity to the Wolfram Cloud.
Allowed Forms
-
2010/21/04 year/day/month 21/04/2010 day/month/year 04/21/2010 month/day/year 2010/04/21 year/month/day Sep 14, 1756 comma separated 1989-11-13 hyphen separated today dates in natural language jan 1st dates including natural language 1989 just a year march just a month apr 2011 a specific month 9 shaban 1435 an Islamic date 26 Kislev 5775 a Jewish date
Restriction Specifications
-
Restricted["Date",{{choices1,…}}] one among choices Restricted["Date",max] a date before max Restricted["Date",{min,max}] a date between min and max Restricted["Date",{min,max,unit}] a date between min and max, with resolution unit
Interpretation
- "Date" yields a DateObject.
Examples
Basic Examples (4)
Interpreter["Date"]["04/21/1982"]Interpreter["Date"]["20100410"]Interpret dates in natural language:
Interpreter["Date"]["yesterday"]Restrict the value to be within a given range:
Interpreter[Restricted["Date", {Today, Today + Quantity[1, "Week"]}]]["tomorrow"]SemanticImportString["Apr. 2, 2010; Aug. 3, 1975; Nov. 14, 1979", "Date", "Columns"]Interpret dates in a number of different formats and calendars:
Interpreter["Date"]["april 2, 2010"]Interpreter["Date"]["2013/11/12"]Interpreter["Date"]["year 2012"]Interpreter["Date"]["ramadan 2001"]Interpreter[Restricted["Date", {DateObject[{2014}], DateObject[{2017}], "Year"}]]["2015"]Interpreter[Restricted["Date", {DateObject[{2014}], DateObject[{2017}], "Year"}]]["March 17, 2015"]Dates that involve a time are not accepted:
Interpreter["Date"]["march 9, 2013 9pm"]See Also
Interpreter SemanticImport Restricted Failure DateObject TimeObject
Interpreter Types: StructuredDate ComputedDate Time DateTime UnixTime ExcelDate DayOfWeek StructuredTime ComputedTime StructuredDateTime ComputedDateTime
Text Contents: Date
Related Guides
History
Introduced in 2014 (10.0)