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

Remove hour from a RadDatePicker

1 Answer 43 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 04 May 2012, 02:15 PM
I have this code:

sb.Append(RadDatePicker1.SelectedDate.Value.Date);

How Can I do to remove only hour. I need date part only.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 May 2012, 05:17 AM
Hello Paulo,

Try the following code to get the date alone.
C#:
DateTime dt = Convert.ToDateTime(RadDatePicker1.SelectedDate);
string value = dt.ToShortDateString();

Thanks,
Princy.
Tags
Calendar
Asked by
Paulo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or