From: Cam on 21 Apr 2010 16:27 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
From: KARL DEWEY on 22 Apr 2010 00:24 Try this -- IIF([YourDateField] < Date(), "Late", IIF([YourDateField] <= Date()+5, "5 days", IIF([YourDateField] <= Date()+10, "10 days", NULL))) -- Build a little, test a little. "Cam" wrote: > 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
|
Pages: 1 Prev: days between tweak Next: Count by short date and group by agent name |