|
-
Aug 23rd, 2007, 12:45 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Cdate Data Type Mismatch
VB6 SP6
I am try to convert a date string to date and insert it into a table (modDate Date). I am getting a data mis-match error but in debug, it appears that the data has been converted.
Code:
Dim ModDate1 As Date
ModDate1 = CDate(Format(flDrawings.ModDate, "MM/DD/YYYY"))
"VALUES ('" & IIf(IsNull(Name$), "a", RTrim(Name$)) & "','" & IIf(IsNull(Revision$), Null, RTrim(Revision$)) & "','" & IIf(IsNull(Descr$), Null, RTrim(Descr$)) & "'," & ModDate1 & ")"
Immediate Results
INSERT INTO engfiles(drwName,Rev,Descr,ModDt)VALUES ('WIDGETII','a','',7/12/2007)
If you find information helpful from any member, please take a second and rate their post. Its a nice gesture of your appreciation.
"I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison
Do illiterate people get the full effect of Alphabet Soup?
ADO FAQ 2005-2008 Masked Textbox Patch FoxPro Date MZ Tools Great Free Tool
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
|