Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    PimP City USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <%= Database & Dates %>

    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!

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Last edited by victoria_1018; 12-31-2003 at 03:48 AM.

  • #3
    New Coder
    Join Date
    Dec 2003
    Location
    PimP City USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...


  • #4
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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

  • #5
    New Coder
    Join Date
    Dec 2003
    Location
    PimP City USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    great, thanks!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •