Week
Syntax
Result = Week ( Date AS Date [ , FirstDayOfWeek AS Integer , FullWeek AS Boolean ] )
Returns the week number from a given date.
- FirstDayOfWeek is the first day of the week.
See Language 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.
Anyway, this function can return zero if we are before the first week of the year.
By default, the first day of the week is Monday, and partial weeks are counted.
See Predefined Constants for a list of constants associated with week days.
Example
PRINT Week("07/24/2005")
29
Example
PRINT Week("01/01/2005")
0
Example
PRINT Week("01/01/2004")
1
See also
Date & Time Functions