View Full Version : <%= Database & Dates %>
12-31-2003, 12:49 AM
What i'm looking to do is when a form is submitted from my site, and sent to the database, I want to add the date at which the form was submitted, so that when it is displayed in the admin backend, I know when the form was sent.
Happy New Year!
12-31-2003, 02:46 AM
You can add a time stamp field in the table recording the forum information in your database and so whenever a record in submitted to the db, the submission time will be recorded
Otherwise, you can create a date time field in your forum page using <%=now()%> and submit this field together with other input fields in the forum table
12-31-2003, 09:01 PM
I dont know how to do the timestamp thing, but I did try your other suggestion, but im getting errors when i try to do it, but it works fine when i insert all but that.
i've tried it over and over, looked it over and over, and i cant see what im doing wrong...
12-31-2003, 11:02 PM
let's say you have a date/time field called addTime
if using access it is as simple as this. just set the default value to now().
If you want to do this through ado then just do so like this
rs("foo") = request.form("foo")
rs("bar") = request.form("bar")
rs("addTime") = now()
or you can do it via a sql statement
you do not even need to use a hidden form field unless you want to show the time that they loaded the form
01-02-2004, 10:55 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.