WeekOfYear()
Category: Date
Syntax: WeekOfYear ( date ) |
Parameters:
dateAny valid date (1/1/000112/31/4000). The parameter should be a string containing a date (for example, "3/17/2004"), an expression with a date result (for example, Date (6, 29, 1969)), or an integer that represents a serialized date value (for example, 718977).
Data type returned: Number
Description:
Returns the week number of the specified date. Weeks are defined as starting on Sunday and ending on Saturday. A partial week at the beginning of the year is considered as week 1, so the WeekOfYear() function can return values from 1 to 54.
WeekOfYear() can be used to return the approximate number of weeks between two dates in the same year. For instance, WeekOfYear("6/1/2001") - WeekOfYear("5/1/2001") returns 4.
January 1st of any given year is always part of week 1, no matter on what day of the week it falls.
Examples:
Function | Results |
---|---|
WeekOfYear ("3/12/2004") | Returns 11. |
WeekOfYear ("12/31/2001") | Returns 53. |
Категории