I am trying to do a fairly trivial task however my experience is in .net not in vb6. Given two strings (say "10/17/94"
and "10/17/95"
for this example) I want to return a string expression
X years
//Date_Due and Date_Time_Performed are strings in the mm/dd/yy format
Duration = (Year(CDate(Date_Due)) - Year(CDate(Date_Time_Performed))) & " years"
but that gives me a runtime error '13' Type Mismatch
.
Any suggestions?
EDIT: None of the answers have adressed this yet. The result of the conversion must be added on to the " years" string. I need the string representation not the int.