DayOfWeek

As of Version 10.0, calendar functionality is built into the Wolfram Language

DayOfWeek[{year,month,day}]
gives the day of the week on which the given date {year,month,day} occurred.

DayOfWeek[{year,month,day,hour,minute,second}]
gives the day of the week for the given date.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (6)Basic Examples  (6)

In[1]:=
Click for copyable input

The Declaration of Independence was signed on a Thursday:

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

The Bastille was stormed on a Tuesday:

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

Canada became an independent nation on a Monday:

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

Wolfram Research began on a Saturday:

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

This gives the day of the week at the time the formula was input:

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

Hours, minutes, and seconds do not affect the day of the week:

In[2]:=
Click for copyable input
Out[2]=
Translate this page: