morrisbo
asked on
Type mismatch error converting string to date variable in vb6
I'm getting a mismatch error when executing following code in vb6 program.
dim sEffDate as string
sEffDate = HO.IPINCPMMDDYYYY
' value of sEffDate is now 08012007
Dim dEffDate As Date
dEffDate = CDate(sEffDate)
' gives error message "Type mismatch"
Can anyone help a vb6 novice?
dim sEffDate as string
sEffDate = HO.IPINCPMMDDYYYY
' value of sEffDate is now 08012007
Dim dEffDate As Date
dEffDate = CDate(sEffDate)
' gives error message "Type mismatch"
Can anyone help a vb6 novice?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works.
Thanks !!
Morris