[help] datediff function

Rmaster

Rmaster
Local time
Today, 19:13
Joined
Mar 7, 2005
Messages
25
Hey guys

i've 2 date field vca and tot,
if the date from vca is 10 years older then the date from tot a statement will change.
i've use serveral codes but notthing worked for me :(
now i'm using this code but is won't work

If DateDiff("d", [Vca], [Tot] > 3650) Then
Me.Value = "Open"
End If

can someone help me please
 
Hello,

Try

If DateDiff("d", [Vca], [Tot]) > 3650 Then

HTH - Bob
 
thanx mate
works fine now
 
won't that mess up if there's a leap year? Or do those 2 days extra not really matter?
 
Rmaster,

you really should be using the DateDiff function to compare on years rather than days...
Right now you don't take into account any leap years, as BCullenward pointed out correctly.

RV
 

Users who are viewing this thread

Back
Top Bottom