|
-
Aug 17th, 2000, 02:17 PM
#1
Thread Starter
Hyperactive Member
I know this is easy but it's really driving me crazy.
I am trying to log the time and date a form is being submitted into a database along with all of the information on the form. I don't want the person filling out the form to be able to change the time and date which is why I have it done like this...
Code:
...
<td>Opened Date </td>
<td><%= Date%></td>
</tr>
<tr>
<td>Opened Time </td>
<td><%= Time%></td>
</tr>
...
This part is working fine. But when I'm trying to save it to a database it's not saving the time, but is saving the date. Here is my code I'm using for that.
Code:
...
rst("OpenedDate") = Date
rst("OpnedTime") = Time
...
I know it's not pulling that from the form but if it's a minute or two off it won't really matter. The date is populating but the time isn't.
Please help. Thanks
If you think education is expensive, try ignorance.
-
Aug 17th, 2000, 02:20 PM
#2
Monday Morning Lunatic
You have rst("OpnedTime")...try rst("OpenedTime").
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 17th, 2000, 02:41 PM
#3
Thread Starter
Hyperactive Member
sorry
I'm sorry. This was retyped while I was posting this. the actual page does have opened on it, not opned.
If you think education is expensive, try ignorance.
-
Aug 17th, 2000, 02:44 PM
#4
Monday Morning Lunatic
That's okay. How about your field definitions? Are they compatible with setting the time?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 17th, 2000, 02:47 PM
#5
Thread Starter
Hyperactive Member
PERFECT!
Thank you very much. That was it. The Date was set right, but Time was set to TEXT. Thanks again.
If you think education is expensive, try ignorance.
-
Aug 17th, 2000, 02:59 PM
#6
Thread Starter
Hyperactive Member
Sorry again
It seems I have jumped to an incorrect conclusion. It still isn't working. The form is right, the submit.asp is right. I am stumped.... again.
If you think education is expensive, try ignorance.
-
Aug 17th, 2000, 03:04 PM
#7
Monday Morning Lunatic
If it is not absolutely necessary to have them as searchable date/time values, use text fields and convert the date/time into a string using the Format function. Other than that, I'd have to see some of your code.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 17th, 2000, 04:20 PM
#8
Thread Starter
Hyperactive Member
I'm sorry but I don't really know what you mean by the format function. If you could expand a little more I'd appreciate it.
Here is some of my code....
default.asp-
Code:
<form action="submit.asp" method="post">
Date Opened: <%= Date%><br>
Time Opened: <%= Time%><br>
<input type="submit" value="Submit">
</form>
submit.asp-
Code:
Dim cnn
Dim rst
Dim ConnectString
...
...
rst.Addnew
rst("OpenedDate") = Date
rst("OpenedTime") = Time
rst.Update
rst.Movenext
rst.Close
I'm not sure if this is going to help you, but that's about what I've got.
If you think education is expensive, try ignorance.
-
Aug 17th, 2000, 06:22 PM
#9
Thread Starter
Hyperactive Member
That was easy....
Sorry but noone here had a chance at this one. Once looking it over with a new pair of eyes it seems the code was written 2x like this...
Code:
rst.addnew
rst("OpenedDate") = Date
rst("OpenedTime") = Time
...
rst("OpenedTime") = Request.Form("OpenedTime")
...
I'm sorry to waste your time. Thanks for the help though.
If you think education is expensive, try ignorance.
-
Aug 18th, 2000, 12:31 PM
#10
Monday Morning Lunatic
Don't worry...I don't have any time to waste .
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|