Change the format of DateTime variable in ASP.NET

Satyapriyanayak
Posted by Satyapriyanayak under ASP.NET category on | Points: 40 | Views : 773
protected void btngetdate_Click(object sender, EventArgs e)
{
DateTime dt = Calendar1.SelectedDate;
string str = dt.ToString("dd:MM:yyyy");
txtDate.Text = str;
}

Comments or Responses

Login to post response