Documentation/How Tos/Calc: WEEKDAY function

From OpenOffice.org Wiki

Jump to: navigation, search


WEEKDAY

Returns the day of the week for a given date.

Syntax:

WEEKDAY(date; type)

returns the day of the week that date falls on, as a number.
The number returned depends on type, as follows:
day of the weektype=1type=2type=3
Sunday176
Monday210
Tuesday321
Wednesday432
Thursday543
Friday654
Saturday765
If type is omitted, it is assumed to be 1.

Example:

WEEKDAY("2008-06-14"; 1)

returns 7. 14Jun08 falls on a Saturday.

See also:

YEAR, MONTH, DAY, HOUR, MINUTE, SECOND

Date & Time functions

Date & Time overview

Personal tools