title: VBScript cookie expiration
body: <p>I'm working on a bit of old code that I inherited.  There is VB script at the top of the index.asp file which is used to set a COOKIE at login time.  Looking at the code it appears as though the cookie should expire on <strong>Date()</strong> (which I assumed was the same day).  However, when I look at the Cookie I created today, it expires on 10/7/<strong>2041</strong>.  My goal is to have the cookie expire in 7 days.  Thanks in advance.</p>
  
  <pre><code>&lt;%@ LANGUAGE=VBScript %&gt;
  &lt;% Option Explicit %&gt;
  &lt;%
    Response.Buffer=true
    On Error Resume Next
  %&gt;
  
  &lt;%
  Dim cookieECP
  Dim fldIAccept
  cookieECP=Request.Cookies("ACIntra")
  fldIAccept=Request.Form("fldIAccept")
  if cookieECP="ON" then
    Server.Transfer("/default.asp")
  elseif fldIAccept="Y" then
    Response.Cookies("ACIntra")="ON"
    Response.Cookies("ACIntra").Expires = Date()
    Server.Transfer("/default.asp")
  end if
  %&gt;
  
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
  </code></pre>