Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004

    Unanswered: Getting the latest date from 4 different date fields


    I was wondering if someone could help me write this query. I have one database with a number of records. In each of this record, I have an ID # and 4 different date fields. I want to compare each of these 4 dates (date1, date2 etc...) against each other. At each comparison, I want to store or retain only the latest date out of these 4 in a separate field called 'latest date'.
    date1 is 040101

    date2 is 040315

    date3 is 031001

    date4 is 021101

    so latest date field should be then 040315. Please let me know how I would store or insert also the last date in 'latest date' field.

  2. #2
    Join Date
    Sep 2004
    Charlotte, NC
    Here is an article from the Microsoft Knowledge Base that has a solution for a problem similar to yours. If you use it, you would need to dimension your fields as a Date rather than an Integer.;en-us;209857


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts