Syntax
=WEEKDAY(serial_number, [return_type])Arguments
| Argument | Required | Description |
|---|---|---|
serial_number | Required | The date |
return_type | Optional | 1 (Sunday = 1), 2 (Monday = 1), 3 (Monday = 0) or 11 to 17 (week starting Monday to Sunday) |
How to use WEEKDAY
WEEKDAY takes 1 required argument and 1 optional argument. Type =WEEKDAY( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=WEEKDAY(DATE(2008,2,14))Result =WEEKDAY(DATE(2008,2,14), 2)Result =WEEKDAY(DATE(2008,2,14), 3)Result Related date and time functions
- SECONDReturns the second (0 to 59) of a time.
- TIMEBuilds a time of day from hours, minutes and seconds.
- TIMEVALUEConverts a time written as text into a fraction of a day.
- TODAYReturns the current date.
- WEEKNUMReturns the week number of a date in its year (the week containing January 1 is week 1).
- WORKDAYReturns the date a number of working days (Monday to Friday) before or after a date, skipping holidays.
- WORKDAY.INTLReturns the date a number of working days before or after a date, with a choice of weekend days and holidays.
- YEARReturns the year of a date.
- YEARFRACReturns the fraction of a year between two dates using a day count basis.