Week

Result = Week ( Date [ , FirstDayOfWeek , FullWeek ] )

Return the week number from a given date.
  • Date is the date to process.

  • FirstDayOfWeek is the first day of the week. See Predefined Constants for a list of constants that represent a week day.

  • FullWeek tells if only entire weeks are counted. If FullWeek is FALSE, then the first partial week of the year is counted if it has at least four days in the year.

By default, the first day of the week is Monday, and partial weeks are counted.

Note that this function can return zero if we are before the first week of the year.

Examples

PRINT Week(Date(2005, 7, 24))
30

PRINT Week(Date(2006, 1, 1))
1
PRINT Week(Date(2004, 1, 1))
0

See also