Skip to main content
Inspiring
June 13, 2008
Question

If Then on Date

  • June 13, 2008
  • 5 replies
  • 514 views
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

Thanks
Andy


This topic has been closed for replies.

5 replies

Inspiring
July 23, 2008
Sorry for the delay - It's an Access DB


"kiss4me08" <webforumsuser@macromedia.com> wrote in message
news:g38n6h$8l3$1@forums.macromedia.com...
> yep id like to know too


Participating Frequently
June 17, 2008
yep id like to know too
Inspiring
June 13, 2008
thanks andy,

out of interest what was the db

regards

k


Inspiring
June 13, 2008
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


Inspiring
June 13, 2008
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