navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Getting and Writing Current Date in AsP

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Getting and Writing Current Date in AsP
Page: [1]
 
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

(in reply to futurewebboss)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Getting and Writing Current Date in AsP
Page: [1]
Jump to: 1





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