...

View Full Version : Returning date of recurring day of week



Cam
12-07-2004, 02:56 PM
I've been tossing around trying to figure out if this is possible: what I'd like to do is return the date of the first Friday of every month. The context is a recurring meeting and I'd like to post the date of the next meeting on an intranet site. Currently I just retrieve it from a database, which I may stick with, but I was wondering if this is possible.

Cheers

Cam

ghell
12-07-2004, 03:37 PM
'arrWeek = Array("", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")

datStartThisMonth = "1/" & Month(Date()) & "/" & Year(Date())

For i = -1 To 11
For j = 1 to 7
datFirstOfMonth = j & "/" & ((Month(datStartThisMonth)+i) Mod 12)+1 & "/" & Year(datStartThisMonth) + Int(i/12)+1
If WeekDay(datFirstOfMonth) = 6 Then Response.Write datFirstOfMonth & "<br>"
Next
Response.Write "<hr>"
Next



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum