26. september 2002 - 20:53
#3
Well I may as well get the glory here too.
'Return a date from a given year and week
Function yw2Date(y As Integer, w As Integer) As Date
'1 = monday (vbMonday = 2)
yw2Date = ywd2Date(y, w, 1)
End Function
'Return a date from a given year week and day of week.
Function ywd2Date(y As Integer, w As Integer, d As Integer) As Date
ywd2Date = DateAdd("d", d - Weekday(DateValue(y & "-01-01"), vbMonday), DateAdd("ww", w - 1, DateValue(y & "-01-01")))
End Function
26. september 2002 - 20:53
#4
example:
Mydate = ywd2Date(y , w, d)
where y = year
w = weeknumber
d = day of week (1 = monday, 2 tuesday ...)