Report Date Argument not showing desired results

magster06

Registered User.
Local time
Today, 15:07
Joined
Sep 22, 2012
Messages
235
Hello All,

I have a report that I would like to place an asterick next to records that are over one year old.

I have created a text box that is unbound and in the control source I have placed this code:

Code:
=IIf(DateDiff('yyyy',[L/D Start Date],Date())>=1,"*","")]

When the report runs, it places an asterick next to everyones name. What am I missing?
 
The formula you are using would evaluate the difference between 31/12/2012 AND 09/01/13 as 1 year because you are focusing on the year alone. A better way to do what you want is to do it as days >=366 OR use Year(Date()) - Year([L/D Start Date]) >=1
 
Thanks for the reply Isskint!

I tried what you had mentioned:

Code:
=IIf(Year(Date())-Year([L/D Start Date])>=1,"*","")

but it still places an asterick next to everones name.

I also tried this:

Code:
=IIf(DateDiff(Year(Date())-Year([L/D Start Date]))>=1,"*","")

Any ideas?
 
Last edited:
Isskint,

I ended up with your first suggestion because I could not get the second one to work:

Code:
=IIf(DateDiff('d',[L/D Start Date],Date())>=366,"*","")]

Thanks for the help!
 

Users who are viewing this thread

Back
Top Bottom