Date Format in Code Behind

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 8137
hi
How to Date Format changing in Code Behind


DateTime date;
string FrDt = "";
if (DateTime.TryParseExact(TxtFr.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out date))
FrDt = date.ToString("yyyy/MM/dd");
}

Comments or Responses

Login to post response