DateObject

DateObject[]
represents the current local date.

DateObject[date,time]
represents the specified date list and TimeObject time.

DateObject[time]
gives a date object corresponding to an AbsoluteTime specification.

DateObject[{y,m,d,h,m,s}]
represents a date object of standard normalized form.

DateObject["string"]
converts a date string to a date object.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Find the current date:

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

Convert an absolute time to a date object:

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

Represent a specific year and month:

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

Add 1000 weeks to a date:

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

Subtract two dates to get a time quantity:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2014
(10.0)