I want to convert a string date formate \"dd/MM/yyyy\" into \"MM/dd/yyyy\" in c# example
string d =\"25/02/2012\"; i want to convert into 02/25/2012
DateTime dt = DateTime.ParseExact(your string date, "d/M/yyyy", CultureInfo.InvariantCulture); // for both "1/1/2000" or "25/1/2000" formats string ndt = dt.ToString("MM/dd/yyyy");
use this namespace also: using System.Globalization;
using System.Globalization;