I have the following code in my project (which was taken from https://stackoverflow.com/a/12257557).
string r = "08/05/2015";
IFormatProvider culture = new CultureInfo("en-US", true);
DateTime t1 = DateTime.ParseExact(r, "yyyy-MM-dd", culture);
the value inside r
is in MM/dd/yyyy
For the ParseExact I am getting the error
string was not recognized as a valid date time.
I gone through most of the question in stackoverflow all are giving the above codes. Do I am missing anything?