# WEEKNUM

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 a number that indicates the week of the year numerically.

## Syntax

WEEKNUM(*date*,*weektype*)

## Arguments

This function has these arguments:

| **Argument** | **Description** |  |
| -------- | ----------- | --- |
| *date* | Date for which you want to determine the number of week |  |
| *weektype* | Type of week determined by on which day the week starts |  |
|  | Value | Number returned |
|  | 1 (assumed if omitted) | Week starts on a Sunday |
|  | 2 | Week starts on a Monday |

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).

## Data Types

Accepts numeric, string, DateTime object, or TimeSpan object data. Returns numeric data.

## Examples

`WEEKNUM(A2)`
`WEEKNUM(R2C1,2)`
`WEEKNUM(23,1)` gives the result 4

## Version Available

This function is available in product version 1.0 or later.

## See Also

[MONTH](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsMtoQ/FunctionMONTH) \| [WEEKDAY](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionWEEKDAY) \| [Date and Time Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsdatetime)