Try the following:
Dim date As Datetime = DateTime.ParseExact(_
yourString, "dd/MM/yyyy", CultureInfo.InvariantCulture)
This will throw an exception if it yourStringdoesn't match the format you specified. If you do not want an exception in this case, do the following:
Dim date As Date
Date.TryParseExact(dateString, "dd/MM/yyyy", CultureInfo.CurrentCulture, _
DateTimeStyles.None, date)
source
share