Cookies Expirations

liunx

Guest
I know this is a very basic question but I can't find the answer in any of my reference materials.

How would I set the expiration of a cookies for 10 hours? Right now I have ).Expires = Date + 1 which should make it restart at midnight, but it's not allowing any of the people using it to sign in again until about 12:10 which leaves 10 minutes of non-used time.

Thanks for your help.

ArtYou could try :

<%cookie("Whatever").expires = dateadd("h", now, 10)%>

Which should add 10 hours to the current time and set the expiry time at that point (My code might need a little work - it's a bit rusty...)That is kind of what I thought, but you're right it is a little off. Thanks btw, here's the correct code for dateAdd....

...Expires = DateAdd("h", 10, Now)

Thanks again.
 
Back
Top