|
| |
|
|
futurewebboss
Posts: 44 Joined: 6/9/2007 Status: offline
|
Getting and Writing Current Date in AsP - 3/6/2008 15:00:44
I have an html form that takes first name and last name and is then submitted to an asp page to write the data to an access db. What I need to do is to time stamp the entry. Can anyone suggest the best way to do this? For example, Can I pass the current date in a hidden form field at the time the user enter his first and last name, or should I get and then write the date in the asp page?
|
|
|
|
ou812
Posts: 1538 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: Getting and Writing Current Date in AsP - 3/6/2008 15:57:14
Personally, I like writing the date to the database at the time of the actual writing. Depending on where your server's timezone is may depend on how you want to do it I use now() for the current date/time and then use dateadd if needed to manipulate the time to account for timezones objRS.Fields("TimeStamp") = dateadd("H",-3,now()) or objRS.Fields("TimeStamp") = now()
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|