# WEEKDAY

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



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](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime).

## 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](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsDtoG/FunctionDATE) \| [DAY](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsDtoG/FunctionDAY) \| [MONTH](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionMONTH) \| [WEEKNUM](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionWEEKNUM) \| [WORKDAY](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionWORKDAY) \| [Date and Time Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime)