24 Hours Time for RadTimePicker Control

2 posts, 1 answers
  1. Surya
    Surya avatar
    35 posts
    Member since:
    Nov 2011

    Posted 08 Aug 2012 Link to this post

    Hi,

      We are using RadTimepicker Control for Winforms.As ,we need time in 24 Hour format , we just set following property

    radTimePicker.TimePickerElement.Format = "HH:mm";

    But we need to Numbers in Clock ( Numbers 12 to 23) will be 24 hour format . How to achieve this ?


    Please find attached image.

    Please guide me.

    Thanks & Regards,
    Surya.
  2. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 13 Aug 2012 Link to this post

    Hi Surya,

    Thank you for writing.

    RadTimePicker uses the String.Format method for formatting the hour/minutes in the popup. As far as I am aware, String.Format uses the time format from the regional setting. You can easy work around this by explicitly setting the Culture property to 24hour culture:    
    radTimePicker1.Culture = new System.Globalization.CultureInfo("en-GB");

    I hope this helps. Regards,
    Peter
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top