Syntax
=WEEKNUM(serial_number, [return_type])Arguments
| Argument | Required | Description |
|---|---|---|
serial_number | Required | The date |
return_type | Optional | The day weeks start on: 1 Sunday, 2 Monday, 11 to 17 Monday to Sunday, 21 ISO weeks |
How to use WEEKNUM
WEEKNUM takes 1 required argument and 1 optional argument. Type =WEEKNUM( 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.
=WEEKNUM(DATE(2012,3,9))Result =WEEKNUM(DATE(2012,3,9), 2)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.
- WEEKDAYReturns the day of the week of a date as a number (by default 1 for Sunday to 7 for Saturday).
- 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.