Torna al Thread
Public static bool ConvertoDate(string dateString, ref DateTime result)
{
try {
string[] supportedFormats = new string[] { "MM/dd/yyyy", "MM/dd/yy", "ddMMMyyyy", "dMMMyyyy" };
result = DateTime.ParseExact(dateString, supportedFormats, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None);
return true;
}
catch (Exception ex) {
return false;
}
}