WeekNum

Generates the calendar week number for a certain date, counting the first week with four or more days in the new year as week 1
Originally by Mattias Frid
OfDate is the date, if blank it will return week number of today

CodeFunctionName
What is this?

Public

Tested

Original Work
Function WeekNum(OfDate)
If OfDate = "" Then OfDate = Date
WeekNum = DatePart("ww", OfDate, 2, vbFirstFourDays)
End Function

OfDate

Views 4,146

Downloads 1,337

CodeID
DB ID