Thread: If Then on Date
View Single Post
  #3 (permalink)  
Old 06-13-2008, 01:39 PM
Andy
 
Posts: n/a
Diggs:
Default Re: If Then on Date

Sorry i should have said - its ASp but i've found the snwer now thanks
For anyone else who may need it its:

%
Dim date1 , date2 , strDateDiff
date1 = Now()
date2 = (RS.Fields.Item("MyDate").Value)
strDateDiff = DateDiff("yyyy" , date2 , date1 )
If strDateDiff > 3 Then %>
Response.Write "your text"
Else
Response.Write "your text"
End If
%>


"Dooza" <doozadooza@gmail.com> wrote in message
news:g2tno8$8t$1@forums.macromedia.com...
> Andy wrote:
>> Hi All...
>> Can anyone help out with this one?
>>
>> I need to do a 'If Then' statement on the current date.
>> Something like this:
>> IF todays date is more than 3 days after the date in the database THEN

>
> ASP or PHP or CF?
>
> Steve



Reply With Quote