|
-
May 6th, 2003, 07:17 PM
#1
Whats wrong with this SQL insert
Here it is:
INSERT INTO discountFile( productID, startDate, startTime, endTime, endDate, weekly, discount, BOGOF, TreeForTwo) VALUES ( " & prodId & ", #" & startDate & "#, '" & startTime & "', '" & endTime & "', #" & endDate & "#, '" & weekly & "', " & disc & ", " & bogof & ", " & tft & " );
Thanks for looking.
-
May 7th, 2003, 01:26 AM
#2
whats the error msg u get ?
regards
madhu
-
May 7th, 2003, 10:06 AM
#3
I have now found out it is to do with date formating.
Dim startDate As String = Format dtpAdjEdtDiscStartDate.Text, "dd,mm,yyyy")
This seems to return at string containing "DDMMYYYY" not a date.
I have tried using a date instead of a String but I get a invalid cast exeption.
Thanks for helping (once again).
-
May 7th, 2003, 10:07 AM
#4
sorry the code is:
Dim startDate As String = Format(dtpAdjEdtDiscStartDate.Text, "dd,mm,yyyy")
(last one was missing bracket.)
-
May 9th, 2003, 03:05 PM
#5
Or you can format it like:
DateTime.Parse(dtpAdjEdtDiscStartDate.Text).ToString("MM/dd/yyyy")
-Cool Bizs
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
|