2 posts, 0 answers
  1. immad
    immad avatar
    3 posts
    Member since:
    Mar 2013

    Posted 17 Jul 2013 Link to this post


    i am using telerik time picker in application.

    i am using this syntax to save time picker data in database


    but its not giving me Text Property in time picker. 

    and also giving me this error

    'Telerik.Web.UI.RadTimePicker' does not contain a definition for 'text' and no extension method 'text' accepting a first argument of type 'Telerik.Web.UI.RadTimePicker' could be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Administrator\Desktop\Server\Attendance System\Attendance\ShiftDefine.aspx.cs 116 36 Attendance

    can u provide me a Syntax


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Jul 2013 Link to this post

    Hi immad,

    The RadTimePicker does not have any Text property. Please have a look at the following C# code to get the selected time.

    string time1 = RadTimePicker1.SelectedTime.ToString(); //time in 24 hour format

    Suppose you want to get the time in 12 hour format, try the following C# code.

    TimeSpan timespan = RadTimePicker1.SelectedTime.Value;
    DateTime time = DateTime.Today.Add(timespan);
    string displayTime = time.ToString("hh:mm tt");

  3. DevCraft R3 2016 release webinar banner
Back to Top