Solved

ASP Cookie Expires on a specific date

Posted on 2004-10-11
3
294 Views
Last Modified: 2008-01-09
Hello,

I have a database that has a column called "DateEnd" with a type of datetime.  So, for example, there is a value in there that is "10/12/2004".  So, how can I make a cookie expire one day after the value in DateEnd?

Thanks in advance.
0
Comment
Question by:rudyflyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 

Accepted Solution

by:
WebJoe earned 100 total points
ID: 12285975
' --- variable for example
Dim dtDateEnd

' ---your code to get the date from the database, add the following:
dtDateEnd = CDate(objRecordset.Fields("DateEnd").Value=

' --- finish DB code

' --- set cookie
Response.Cookies.Expires = DateAdd("d", 1, dtDateEnd)
0
 

Expert Comment

by:WebJoe
ID: 12563274
Sorry about the typo in line 5, it should read

dtDateEnd = CDate(objRecordset.Fields("DateEnd").Value)
0
 

Expert Comment

by:WebJoe
ID: 12567755
Thank you for the grade, rudyflyer
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question