Return to Snippet

Revision: 70704
at June 13, 2016 19:57 by cueballrawn

Initial Code
Week*: IIf(Format([DateField],"ww")=53,"Wk 1-" & Format([DateField],"yyyy")+1,"Wk " & Format([DateField],"ww-yyyy"))

Initial URL

Initial Description
The week function produces week numbers 1 to 52, starting from the first Sunday in the year (week runs Sunday to Saturday). Rather than rolling over the remaining few days in the year to week 01, the function produces week 53 which is not a full week. This code therefore ensures you always have 52 full weeks, albeit a few days may not be in the same year.

Initial Title
Access (T-SQL) Convert week 53 to week 01

Initial Tags

Initial Language