"DateTime" (Interpreter Type)
Date with time in any standard format or in natural language.
Details
- "DateTime" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "DateTime" requires connectivity to the Wolfram Cloud.
Restriction Specifications
-
Restricted["DateTime",{{choices1,…}}] one among choices Restricted["DateTime",max] a date with time before max Restricted["DateTime",{min,max}] a date with time between min and max Restricted["DateTime",{min,max,unit}] a date with time between min and max, with resolution unit
Interpretation
- "DateTime" yields a DateObject with a TimeObject as its second argument.
Examples
Basic Examples (3)
Interpreter["DateTime"]["Friday, February 28, 2014, 10:30:00 AM GMT"]Interpret dates with time in natural language:
Interpreter["DateTime"]["now"]Restrict the value to be within a given range:
Interpreter[Restricted["DateTime", {Today, Today + Quantity[2, "Day"]}]]["tomorrow at 3 pm"]Interpreter[Restricted["DateTime", {-Infinity, Now, "Minute"}]]["21:15 January 12th, 1990"]Pure dates or pure times are not accepted:
Interpreter["DateTime"]["1989/12/03"]Interpreter["DateTime"]["8 pm"]Related Guides
History
Introduced in 2014 (10.0)