Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Friday Function 1

Status
Not open for further replies.

Trudye

Programmer
Sep 4, 2001
932
US
Does anyone have a handy little function/procedure that determines the first Friday in a month?

Thanx
Trudye
 
Something like this ?
Public Function FirstFriday(myDate As Date) As Date
Dim d As Date, w As Integer
d = DateSerial(Year(myDate), Month(myDate), 1)
w = Weekday(d, 6)
FirstFriday = d + IIf(w, 8 - w, 0)
End Function

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

Thanks so much for responding I came up with one on my own.

Trudye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top