Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Posting the Date

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am really new at this, but what I want to do is have the current date and time show up on my asp page and then have that time and date post to my database. I have the current time and date on my page, but I can't get it to post.
Thanks for your help!
 
ok if your database is an access one this is easy, just go to the table in question in the design view, highlight the field for the date, and in the section labeled value type

now()

hope that helps
 
the date will change to whatever the date is when a record is entered, so for instance if the record is entered tomorrowq then the date for tomorrow will be in the field that is posted
etc
 
if your asp page and database are on different servers, you could end up with slightly different date/times that way, since different servers' clocks are always just a bit off.

to avoid that, if it could be an issue, when you insert or update a record in your database, set the datefield in the record = now in your sql insert/update statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top