The following part of code tries to convert a string that looks like "290205" to date
Dim rcdatcom As New Date
...
rcyy = input.Substring(9, 2)
rcmm = input.Substring(11, 2)
rcdd = input.Substring(13, 2)
rcdate = Trim(rcdd + rcmm + rcyy)
rcdatcom = CDate(rcdate)
But every time an error occurs saying "Cast from string "022805" to type 'Date' is not valid."
Can anyone help please?
Dim rcdatcom As New Date
...
rcyy = input.Substring(9, 2)
rcmm = input.Substring(11, 2)
rcdd = input.Substring(13, 2)
rcdate = Trim(rcdd + rcmm + rcyy)
rcdatcom = CDate(rcdate)
But every time an error occurs saying "Cast from string "022805" to type 'Date' is not valid."
Can anyone help please?