26 June 2013

Change the format of DateTime variable in asp.ner & c#

protected void btngetdate_Click(object sender, EventArgs e) 
{ 
DateTime dt = Calendar1.SelectedDate; 
string str = dt.ToString("dd:MM:yyyy"); 
txtDate.Text = str; 
}

No comments:

Post a Comment