I have a Number-961006 which is actually DOB.(96-year,10-month,06-day).I want to fill the year,means i want the value as 19961006 or if the number is 011006 the number should be 20011006. I tried converting it to CDate(number).tostring(“yyyymmdd”)but its throwing an error
It’s supposed to be string. String is what the function requires, not number.
Show us your entire expression and what the first Message Box shows. Make sure you don’t have any extra spaces at the beginning or end of the string. You can just use ID_num.Trim in the ParseExact.