My problem is that i am not able to convert the US date value into british format. The TryParse condition is always coming out as false and thus the outputValue is never filled up.
Is there something wrong with the implementation ? Please pin point or suggest better alternative. Thanks.
string filterValue = "12/22/2011"
string outputValue = ""
DateTime dt;
string strCulture = "en-GB";
CultureInfo ci = new CultureInfo(strCulture);
if (DateTime.TryParse(filterValue, ci, DateTimeStyles.AdjustToUniversal, out dt))
outputValue = dt.ToString("d", ci);
You use British culture for parsing date in US format. Use code below.