...

View Full Version : <%= Database & Dates %>



Governator
12-31-2003, 01:49 AM
Hi!

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.

Thanks!

Happy New Year!

victoria_1018
12-31-2003, 03: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

Governator
12-31-2003, 10: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...

:confused:

miranda
01-01-2004, 12:02 AM
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.addnew()
rs("foo") = request.form("foo")
rs("bar") = request.form("bar")
rs("addTime") = now()
rs.update

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

Governator
01-02-2004, 11:55 PM
great, thanks!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum