This is a migrated thread and some comments may be shown as answers.

Date Format

1 Answer 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mugil
Top achievements
Rank 1
Mugil asked on 14 Mar 2013, 06:58 PM
HI,


    i have the date format like 2/8/2013 from this i want only 8 how can i get it.
    that means i want to get particular part from the date format.




 Thanking You,
 P.Mugil

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Mar 2013, 03:42 AM
Hi,

Here is the sample code snippet I tried for extracting the month from the date selected using RadDatePicker.

C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    int month = Convert.ToDateTime(RadDatePicker1.SelectedDate).Month;
    RadTextBox2.Text = month.ToString();
}

Thanks,
Princy.
Tags
General Discussions
Asked by
Mugil
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or