Results 1 to 3 of 3
  1. #1
    rb26dett26 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    8

    Criteria, Multiple intervals

    I am trying to make a query where it retrieves the names of the employees where their certifications are about to expire.

    I have the dates when they first got certified and they expire two years from that day.

    The query would retrieve those employees where the (first Cert Day) <= (first Cert Day + 2 years ) - 3 months

    I want the query to return the ones who are 3 months away from being expired.

    I tried adding: Dates in Column <= DateAdd("yyyy",2,[Column]) - DateAdd("m",3,[Column])

    but that doesnt work.



    What would be the correct format for using multiple intervals?

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Maybe try this, add a column:
    CertNotifyDate: DateAdd("mm", 21, [FirstCertDate])

    In criteria on that field add:
    <= Date()

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK, lets say an employee became certified on 1/6/2015. Then the expiration date would be 1/5/2017 (+2 yrs).
    If today is 12/1/2016, then you would look for expiration dates between 12/1/2016 and 3 months from today (3/1/2017)?

    Maybe try
    Code:
    SELECT CertDate, DateAdd("yyyy",2,[certdate])-1 AS CertExpire
    FROM tbldates
    WHERE (((DateAdd("yyyy",2,[certdate])-1) Between Date() And DateAdd("m",3,Date())));

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

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  2. Time intervals
    By Dutch1956 in forum Queries
    Replies: 5
    Last Post: 07-12-2012, 11:21 PM
  3. Replies: 1
    Last Post: 01-17-2012, 02:51 PM
  4. Replies: 1
    Last Post: 07-13-2011, 11:00 AM
  5. Help with Time Intervals
    By ddog171 in forum Queries
    Replies: 3
    Last Post: 03-07-2006, 06:20 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