|
-
Jul 15th, 2001, 01:12 PM
#1
Thread Starter
Lively Member
VBScript - Type Mismatch - Date and Time
I am using VBSCRIPT and ASP. The control I am using is the Date and Time Picker. When I use my INSERT sql statemtn it works fine. I place the value of the dtpicker into a variable like this:
dim DateEnter, DateEntered2
DAteEnter = request.form("DtPicker1")
DateEntered2 = cdate(DateEnter)
then my INSERT SQL Statement...
This works if I am submitting from this form, but if I pass the value of the Dtpicker1 and place the value into a hidden text box and then I go like this:
DateEnter = request.form("hid1")
DateEntered2 = cdate(DateEnter)
I get a Type mismatch on the cdate. Why do I get this error is it because the value is no longer a date in the text box, but then again I am trying to convert the value to a date valeu with the cdate. The value of the hid1 is a date and time value does this make a difference? Is there a way to take just the date and omit the time? When I do a response.write ..... it displays the dtpicker value on the screen.
Any suggestions?
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
|