"StructuredDateTime" (Interpreter Type)
Date with time in a standard format.
Details
- "StructuredDateTime" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "StructuredDateTime" does not require connectivity to the Wolfram Cloud.
Allowed Forms
- A date in a format allowed by "StructuredDate", followed by a time specification in a format allowed by "StructuredTime".
Restriction Specifications
-
Restricted["StructuredDateTime",{{choices1,…}}] one among choices Restricted["StructuredDateTime",max] a date with time before max Restricted["StructuredDateTime",{min,max}] a date with time between min and max Restricted["StructuredDateTime",{min,max,unit}] a date with time between min and max, with resolution unit
Interpretation
- "StructuredDateTime" yields a DateObject with a TimeObject as its second argument.
Examples
Basic Examples (2)
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[{2010, 12, 15}, TimeObject[{13, 30, 0.}]], DateObject[{2010, 12, 15}, TimeObject[{13, 30, 0.}]] + Quantity[2, "Day"]}]]["2010/12/16 00:00:00"]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"]Interpreter["StructuredDateTime", DateFormat -> {"Day", "-", "Month", "-", "Year", "@", "Hour", ":", "Minute"}]["9-3-2013 @ 9:10"]Related Guides
History
Introduced in 2014 (10.0)