"DateTime" (interpreter type)

Date with time in any standard format or in natural language.

DetailsDetails

  • "DateTime" can be used in Interpreter and related constructs, including deployed smart form fields.
  • Use of "DateTime" requires connectivity to the Wolfram Cloud.

Allowed FormsAllowed Forms

  • All the date specifications allowed by "Date" combined with the time specifications allowed by "Time":
  • 1988/11/23 9:30:34date time
    15:45 June 30th, 1899 ADtime date
    2014-05-20T17:42:55ISO formats
    today @ 1 o'clocknatural language

Restriction SpecificationsRestriction 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

InterpretationInterpretation

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Interpret dates with time:

In[1]:=
Click for copyable input
Out[1]=

Interpret dates with time in natural language:

In[1]:=
Click for copyable input
Out[1]=

Restrict the value to be within a given range:

In[1]:=
Click for copyable input
Out[1]=

Set a resolution of minutes:

In[1]:=
Click for copyable input
Out[1]=

Pure dates or pure times are not accepted:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=