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

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

1 Answer 49 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Hai
Top achievements
Rank 1
Hai asked on 17 May 2011, 05:16 AM
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?

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 19 May 2011, 02:39 PM
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.

Tags
Scheduler
Asked by
Hai
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or