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 6 of 6

Thread: Date Question

  1. #1
    New Coder
    Join Date
    Jan 2003
    Location
    Georgia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Date Question

    I am sure this is easy for some, I just do not understand.

    Date Question -
    Is there a way of displaying a date automatically in a field? I have declared it it just does not show up. I can enter a date and it saves, I just want to do it automatically - dynamic.

    Thank you in advance.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Lake Forest, CA
    Posts
    259
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <input type="text" name="InsertDate" value="<%= FormatDateTime(Date) %>">
    The Wizzard
    OC Motor Cars | OC Auto Sports (Coming Soon!)

  • #3
    New Coder
    Join Date
    Jan 2003
    Location
    Georgia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Question #2
    Thank you for the code example. To explain a little further:
    I have a inventory database and when the data entry people enter the inventory and hit submit, I want the date to automatically go in the field for that entry. Not to automatically be updated by the actual real date everyday those recprds are opened. I am sorry for the confusion.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Lake Forest, CA
    Posts
    259
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Create a field called "Date" or whatever you want, and then have two seprate forms, one to "Add" new inventory, and one to "Update" current inventory.

    Then, when you go to Update inventory, use this...

    <input type="text" name="Date" value="<% = rsTbl("Date") %>">
    The Wizzard
    OC Motor Cars | OC Auto Sports (Coming Soon!)

  • #5
    New Coder
    Join Date
    Jan 2003
    Location
    Georgia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I created a field called Date for the update and edit. My only problem with the above code the date stays blank. I did the below code and it is still blank:

    Code:
    <%
    Dim Date
    If Date = "" then
       Date = request("Date")
    End If
    %>
    Date<br>
    <input type="text" name="Date" value="<% = Server.HTMLEncode(rs("Date")) %>"><br>
    I thought this would work. Am I missing something?? Thank you again for your previous help.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Lake Forest, CA
    Posts
    259
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This tutorial should help you out...

    http://www.webwizguide.com/asp/tutor...m_database.asp
    The Wizzard
    OC Motor Cars | OC Auto Sports (Coming Soon!)


  •  

    Posting Permissions

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