convert datetime to date format dd/mm/yyyy

The Solution to convert datetime to date format dd/mm/yyyy is


DateTime dt = DateTime.ParseExact(yourObject.ToString(), "MM/dd/yyyy hh:mm:ss tt", CultureInfo.InvariantCulture);

string s = dt.ToString("dd/M/yyyy", CultureInfo.InvariantCulture);

~ Answered on 2011-02-19 10:07:57


Most Viewed Questions: