Results 1 to 7 of 7
  1. #1
    jmclemor is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2013
    Posts
    3

    Return the date for the first Saturday in December of the current year

    Hello,



    I'm very rusty in my Access skills (haven't been using Access for many years) but am working on a database now where I need to pull the date of the first Saturday of December for the current year. I am using this as criteria in a query and so I really need this using the DateSerial() function if possible.

    Here's what I have that is NOT working correctly:

    =DateSerial(Year(Date()),12,Day(DateSerial(Year(Da te()),12,WeekDay(12/01/Year(Date()), 7))))

    Thanks so much for any help you can provide. I'll be in your debt!

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Try, DateSerial(2013,12,7)

    Dale

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Quote Originally Posted by rzw0wr View Post
    Try, DateSerial(2013,12,7)
    I think the point is to pull it dynamically. Try this, tested in the Immediate window

    ?DateSerial(Year(date()), 12, 0) + (8 - WeekDay(DateSerial(Year(date()), 12, 0), 7))
    12/7/2013
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Well that makes sense, pbaldy.

    I was wondering.

    Dale

  5. #5
    jmclemor is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2013
    Posts
    3
    Works exactly as needed! Thanks so very much.

    And thanks rzw0wr for your help as well.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    jmclemor is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2013
    Posts
    3
    Thanks! I appreciate the welcome, pbaldy.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-09-2013, 11:16 AM
  2. Replies: 4
    Last Post: 07-27-2012, 02:37 PM
  3. Replies: 4
    Last Post: 11-10-2011, 03:16 PM
  4. Current Month and Year-To-Date
    By DSnipeFunk in forum Access
    Replies: 4
    Last Post: 05-31-2011, 11:38 AM
  5. Changing a date to the current year
    By fdnyfish in forum Access
    Replies: 1
    Last Post: 03-01-2008, 08:34 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums