Click to See Complete Forum and Search --> : comparing dates fro redirection


havey
06-09-2005, 04:22 PM
hi, i'm pulling one date field from the db and i'm getting the other date field from Date()
so...
cx = rs("originalDate")
ee = Date()

I would like to know how i can response.redirect the user based on whether a year has passed from the originalDate until now


thnx

wmif
06-09-2005, 05:04 PM
use datediff() to get the difference in dates.

if datediff("yyyy",rs("originalDate"),Date()) > 1 then response.redirect("oneyearpage.asp")