Quote:
Originally posted by carvelo
I'm trying to delete particular data in a table that's over 5 minutes old. I have a 'timecreated' field in the table and need to check that against the current time to see if it should be deleted. I've tried datediff, but I guess that doesn't work in ASP. I'm pretty new, so please help me out if you can. Thanks!
-Nick
|
DateDiff has always worked for me... you must be doing something incorrectly...
Try this simple little snippet of code to see...
t1=now()
str="test"
for n=1 to 5000000
str=str+"n"
If Len(str)>100 then str=""
next
t2=now()
response.write datediff("s",t1,t2)
It should return a time difference of just a few seconds back to you.
To get it to work to time minutes, just replace the "s" with "n".
Hope this helps....
Tim