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

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

OfDate

Views 478 Downloads 144

'Weeknumber', 'week number', 'date', 'calendar'

ANmarAmdeen
324
Date+Time Classic ASP
Revisions

v1.0