PDA

View Full Version : Comparing dates


Stealth
07-02-03, 09:15 AM
DateDiff has always messed me around i can never get my head around it.
All im trying to do is see if a date is 2 weeks old or more.

any suggestions plz?

sufyan
07-07-03, 02:50 AM
Hi,

Try:

<%
Dim d1, d2

d1 = ' First date - eg. #1/1/2003#
d2 = ' Second data - eg. #16/1/2003#
If DateDiff("d", d1, d2) >= 14 Then
' If DateDiff more than or equal 14
Else
' Anything less that 14
End If
%>

Hope this helped