Help with 3 scenerio query

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
 
K

KARL DEWEY

Try this --
IIF([YourDateField] < Date(), "Late", IIF([YourDateField] <= Date()+5, "5
days", IIF([YourDateField] <= Date()+10, "10 days", NULL)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top