public static DateTime ToDateTime(this string date)
{
DateTime date1 = DateTime.MinValue;
string[] dateArr = null;
try
{
dateArr = date.Split('.');
if (dateArr.Length >= 3)
{
date1 = new DateTime(int.Parse(dateArr[2]), int.Parse(dateArr[1]), int.Parse(dateArr[0]));
}
}
catch (Exception)
{
}
return date1;
}




#1 by Norman on April 12th, 2012
Quote
Waiting for Carstens comment, how clever people would do it ;)