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."
string dateString = "13/06/2011";
DateTime dt = DateTime.Parse(dateString);
I have also tried this but same exception.
DateTime aa = DateTime.ParseExact(dateString, "MM/dd/yyyy", new System.Globalization.CultureInfo("en-GB"));
Please let me know how can i convert uk format date in string to us date format.
Thanks.
See Question&Answers more detail:os