1. Registered User
Join Date
Jan 2004
Posts
106

the following formula finds all books that were returned late and works out how many days late they are:

Days Late: IIf([Date Returned]<[Date Due Back],DateDiff("d",[Date Returned],[Date Due Back]))

how do i make it display 0 in "Days Late" if the book was returned on or before the date it was due back?

2. Grand Poobah
Join Date
Sep 2003
Location
MI
Posts
3,713

## Re: Formula

Originally posted by craig_dixon
the following formula finds all books that were returned late and works out how many days late they are:

Days Late: IIf([Date Returned]<[Date Due Back],DateDiff("d",[Date Returned],[Date Due Back]))

how do i make it display 0 in "Days Late" if the book was returned on or before the date it was due back?
IIf([Date Returned]<[Date Due Back],0,DateDiff("d",[Date Returned],[Date Due Back]))

3. Registered User
Join Date
Jan 2004
Posts
106
that formula works for the dates that are the same but if a date in teh "date ruturned" field is less than in the "date due back" field then a minus number appears in "days late", whereas i wan a 0 to appear here aswel

4. Registered User
Join Date
Dec 2003
Location
Posts
238
Originally posted by craig_dixon
that formula works for the dates that are the same but if a date in teh "date ruturned" field is less than in the "date due back" field then a minus number appears in "days late", whereas i wan a 0 to appear here aswel