Friday, February 12, 2016

Split Date and Time from DateTime

You can easily split date and time from a datetime. See this:


DateTime dtValue;  // load your date & time into this variable
TextBox1.Text = dtValue.ToString("yyyy-MM-dd");
TextBox2.Text = dtValue.ToString("HH:mm:ss");

No comments:

Post a Comment