time for a cookie

Results 1 to 2 of 2

Thread: time for a cookie

  1. #1
    Join Date
    Dec 1969

    Default time for a cookie

    I just have no experience here. This is what I&#039m trying to do, I want to set<BR>a cookie only if the last time a cookie was set is longer than, let&#039s say 30<BR>min ago. This is what I have so far. I think where I fall short is knowing<BR>how to subtract 30 min from now.<BR><BR>if now() &#060;&#062; Request.Cookies("lastvisit") then<BR>Response.Cookies("lastvisit") = (""&now()&"")<BR>Response.Cookies("lastvisit").Exp ires = Date + 30<BR><BR>thanks for the help<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: time for a cookie

    this is more of a VBScript question I think<BR><BR>try<BR><BR>If Request.Cookies("lastvisit") &#060;&#062; "" then<BR> If DateDiff("n",Request.Cookies("lastvisit"),Now()) &#062; 30 then<BR> &#039.....set your cookie<BR> else<BR> &#039.....do something different<BR> end if<BR>else<BR> &#039.....set your cookie<BR>end if<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts