Remove hour from a RadDatePicker

2 posts, 0 answers
  1. Paulo
    Paulo avatar
    56 posts
    Member since:
    Apr 2012

    Posted 04 May 2012 Link to this post

    I have this code:

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

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

    Thanks.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 May 2012 Link to this post

    Hello Paulo,

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

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top