The yearweek function calculates the week number (1-53) of a date value.
Syntax
Returns
An integer value from 1 to 53 (inclusive). The date format selected in Windows Control Panel changes the date sequence but does not affect which value is returned by a Date function.
Usage
This yearweek function always counts January 1st-7th as Week1, January 8th-14th as Week 2, etc. In a non-Leap Year, the only day in Week 53 is December 31st. In a Leap Year, December 30th is also counted in Week 53 (all dates following February 28 are affected by leap year).
Examples
Returns: 1
Returns: 52 ( most North American formats)
Returns: 52 ( most European formats)
Returns: 52 (parentheses Metric format)parentheses
Converts the day portion of the value in the DATE field into an integer from 1 to 53, representing the week of the year, for every record processed. If a record contains the value 12/30/96 (a Leap Year) in the DATE field, the function returns 53.
Product: Dataease [{8}]FIVE. Written by Jason Caldwell 25/02/14 at 10:50:08
Product: Dataease [{8}]FIVE. Written by Peter Birney, PB Associates 01/03/14 at 09:02:02
Product: Dataease [{8}]FIVE. Written by DataEase 01/03/14 at 10:06:51
Product: Dataease [{8}]FIVE. Written by Jason Caldwell 01/03/14 at 11:56:42