The date that scan from word document which is 30/08/2012 but when it loads into my program it prints 20/10/05. Below code have error for convert it.
Dim str() As String
str(1) = Convert.ToDateTime(Format("yy-MM-dd"))
Any suggestion?
Try this code
Dim output As Date = Date.ParseExact(str(1), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture)
str(1) value is 30/08/2012 is must recognize it. The first parameter must be the date string. Maybe it has more invalid characters: you have to get only the date string first.