Help with 3 scenerio query

  • Thread starter Thread starter Cam
  • Start date Start date
C

Cam

Hello,

I am trying to put a formula in the query so that if any date in the the
date field is 5 days from today, return "5 days", if 10 days from today,
return "10 days", then if date field is less than today, return "Late". Thanks

Sample data would be:
Date Return field
4/1/10 Late
4/15/10 Late
4/23/10 5 days
4/26/10 5 days
4/29/10 10 days
5/2/10 10 days
 
Try this --
IIF([YourDateField] < Date(), "Late", IIF([YourDateField] <= Date()+5, "5
days", IIF([YourDateField] <= Date()+10, "10 days", NULL)))
 
Back
Top