Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Unanswered: finding first friday

    i want the user to put in a date and i want to find the first friday of that month and the last firday of that month and put them into 2 text boxes.

    can any1 help

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    I just read some posts on how to do this a few weeks past. I don't have your answer but have you tried doing a search on this website for First Friday or Last Friday of Month?
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    May be an easier way, but thiis will do it! Make sure you scroll to get all the code that's not visible!

    FirstFriday = DateSerial(Year(YourDate), Month(YourDate), 1) + (6 - Weekday(DateSerial(Year(YourDate), Month(YourDate), 1)))
    LastDayOfMonth = DateSerial(Year(YourDate), Month(YourDate) + 1, 0)
    If DateDiff("d", FirstFriday, LastDayOfMonth) >= 28 Then
      LastFriday = FirstFriday + 28
      LastFriday = FirstFriday + 21
    End If
    Good Luck!

    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts