I am converting the uk date format string to US format to save this into database but it throw me error \"String was not recognized as a valid DateTime.\"
st
DateTime.Parse with an en-GB culture works fine:
string dateString = "13/06/2011"; DateTime aa = DateTime.Parse(dateString, new CultureInfo("en-GB")); // aa.Day == 13 // aa.Month == 6 // aa.Year == 2011 string result = aa.ToString("d", new CultureInfo("en-US")); // result == "6/13/2011"