Results 1 to 3 of 3
  1. #1
    Njliven is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    86

    Determine which field has the newest date

    Please let me know if this is possible. I have two date fields in a record. I want the query to bring back only the most recent date from either one of the fields. So If date1 is more recent than date2, then show date 1 or if date2 is more recent than date1 then show date1. Seems feasible, just not sure how to write it to make it work. Nothing I have tried so far works. Thanks!

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Try:
    Code:
    MostRecentDate:IIF([DateField1]>[DateField2],[DateField1],[DateField2])

  3. #3
    Njliven is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    86
    Works! Thanks!

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

Similar Threads

  1. show only newest date for given criteria
    By sunil rathore in forum Queries
    Replies: 1
    Last Post: 07-26-2013, 06:35 AM
  2. how to get data with newest date
    By nubi3 in forum Queries
    Replies: 3
    Last Post: 04-30-2013, 12:14 PM
  3. Sort Records Via Date (Newest first)
    By tweety in forum Forms
    Replies: 4
    Last Post: 01-28-2013, 09:23 AM
  4. Using the date to determine if something was late.
    By lyrikkmashairi in forum Access
    Replies: 3
    Last Post: 11-02-2010, 10:59 AM
  5. Query From Newest Date
    By SSgtJ in forum Queries
    Replies: 2
    Last Post: 01-21-2010, 01:51 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