txtDate.Text = Convert.ToString(Dt.ToString("dd MMM yyyy"));
string myDate = "date from database"; DateTime dt; //verify given date is valid or not if (DateTime.TryParseExact(myDate, "dd/MMM/yyyy", CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out dt)) { //Valid date format MessageBox.Show(dt.ToString("dd MMM yyyy")); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)