WEEKNUM

Returns the week number of a specific date.

Syntax

WEEKNUM(x_date,[return_type])
  • x_date - Required. A date within the week. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.

  • return_typeOptional. A number that determines on which day the week begins. The default is 1.

Example

Example Returns Description
WEEKNUM(DATE '2012-03-09') 10

Number of the week in the year that 3/9/2012 occurs, based on weeks beginning on Sunday (default).

WEEKNUM(DATE '2012-03-09', 2) 11 Number of the week in the year that 3/9/2012 occurs, based on a week beginning on Monday (the second argument, 2).