Results 1 to 2 of 2
  1. #1
    97rstd is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    6

    Date Query Problems

    I need to make some querys for HR functions. I need to be able to query for current calendar month and find 1 month, 6 month, 2 year, and 5 year anniversarys of start date that land in that current month.



    So for the one month query I'm using this to find the one month anniversary date and put in a new field called 1month:
    1month: DateAdd("m",1,[Hire Date])

    Now how would I query that field to be able to report off of any aniversary date landing in the current month and year?

    I'm definately an access rookie so speak slowly and use small words!

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    This query selects records that are in those number of months. I don't know what you want to do with it next.

    SELECT Table1.HireDate, DateDiff("m",[HireDate],Date()) AS NumMonths
    FROM Table1
    WHERE (((DateDiff("m",[HireDate],Date())) In (1,6,12,24,60)));

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

Similar Threads

  1. Replies: 12
    Last Post: 05-22-2011, 03:49 PM
  2. Query Problems
    By brc in forum Reports
    Replies: 6
    Last Post: 03-24-2011, 11:53 AM
  3. Problems with IIF in query
    By ducecoop in forum Access
    Replies: 1
    Last Post: 11-15-2010, 10:29 AM
  4. SQL Query Problems
    By slaterino in forum Queries
    Replies: 2
    Last Post: 08-26-2010, 09:06 AM
  5. Query problems
    By geoffishere in forum Forms
    Replies: 1
    Last Post: 02-09-2010, 12:43 PM

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