But beware!  The DateDiff function works on integer years.  It 
doesn't round to the nearest year.  So, if you ask it to give the 
number of years between 12/31/2007 and 1/1/2008, the answer is 1.

The poster's suggestion is probably better:

If DateAdd("yyyy", 5, fldDate) < Date() Then 
    'it is expired
End If

OR

If DateAdd("yyyy", -5, Date()) > fldDate Then
    'it is also expired
End If

Reversing the > and < signs will of course give you the case where it 
is not expired.

Peter



I think the 
--- In [email protected], Shae Tal <[EMAIL PROTECTED]> wrote:
>
> You can use the datediff function to check the difference between 
the qualification date an now.
> Bill <[EMAIL PROTECTED]> wrote:          Quick question is there a 
simple expression I can use to tell if a date 
> is 5 years old i.e. I have a date field when a qualification was 
> attained but want to run a query to flag dates that have expired I 
am 
> thinking something like taking the date in the field adding 5 years 
and 
> have it greater or less than Date() any thoughts ? Thanks in 
advance 
> 
> Bill
> 
> 
> 
>                            
> 
>        
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  
Try it now.
> 
> [Non-text portions of this message have been removed]
>


Reply via email to