Spread Formula Reference
WEEKDAY
Formula Functions > Functions T to Z > WEEKDAY

This function returns the number corresponding to the day of the week for a specified date.

Syntax

WEEKDAY(date,type)

Arguments

This function has these arguments:

Argument Description  
date Date for which you want to determine the day of the week provided  
type [Optional] Number that represents the numbering scheme for the returned weekday value; can be any of:  
  Value Number returned
  1 or omitted Numbers 1 (Sunday) through 7 (Saturday)
  2 Numbers 1 (Monday) through 7 (Sunday)
  3 Numbers 0 (Monday) through 6 (Sunday)

Specify the date argument as a number (as in 37806.5) a string (as in "7/4/2003 12:00"), or a DateTime object, as in DATE(2003,7,4). For more details on the date inputs, refer to the discussion in Date and Time Functions.

Remarks

The returned day of the week is given as an integer, ranging from 0 to 6 or 1 to 7, depending on the setting of the type argument.

Data Types

Accepts numeric, string, or DateTime object for both arguments. Returns numeric data.

Examples

WEEKDAY(A2)

WEEKDAY(R2C1)

WEEKDAY(36828) gives the result 1 equivalent to Sunday

WEEKDAY(46,2) gives the result 3

Version Available

This function is available in product version 1.0 or later.

See Also

DATE | DAY | MONTH | WEEKNUM | WORKDAY | Date and Time Functions