How to display date and time of an appointment separately in grid view?

2 posts, 0 answers
  1. Hai
    Hai avatar
    18 posts
    Member since:
    Nov 2010

    Posted 17 May 2011 Link to this post

    Hi,
    I am building a rad grid to display all the appointments. The problem I am having right now is to display date and time of an appointment in 2 different columns. May you show me how to separate date and time from an appointment StartTime?
  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 19 May 2011 Link to this post

    Hello Hai,

    The Start and End properties of the Appointment type are of DateTime type.
    In order to get the date you need to simply access the Date property of the DateTime object (apt.Start.Date).
    And to access the time during this date you have to get the apt.Start.TimeOfDay.


    Regards,
    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top