Results 1 to 3 of 3
  1. #1
    dring is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    2

    IF with Dates Query

    Hi All,



    This is my first post as I am new to using Access and am having a difficult time with a query to set a 1 or 0 dependent on 3 time fields. This is what I'm trying to get from the Access query.

    IF Time.1<=Time.2 AND Time.3<=Time.1 return 1 Else 0.

    The fields I'm working with are in the format of MM/DD/YYYY HH:MM:SS.

    I sincerely appreciate any help provided!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    if this is used in a query:

    iif(([time1]<=[time2]) and ([time3]<=[time1])),1,0)

  3. #3
    dring is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    2
    Quote Originally Posted by ranman256 View Post
    if this is used in a query:

    iif(([time1]<=[time2]) and ([time3]<=[time1])),1,0)
    This worked, Thanks!

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

Similar Threads

  1. Replies: 2
    Last Post: 09-19-2017, 11:31 AM
  2. Replies: 5
    Last Post: 07-12-2014, 02:55 PM
  3. Replies: 5
    Last Post: 01-29-2014, 02:42 PM
  4. Replies: 1
    Last Post: 10-18-2013, 03:14 PM
  5. Query input dates for range of dates in two fields
    By kagoodwin13 in forum Queries
    Replies: 3
    Last Post: 02-13-2012, 04:25 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