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

24 Hours Time for RadTimePicker Control

1 Answer 396 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Surya
Top achievements
Rank 1
Surya asked on 08 Aug 2012, 07:44 PM
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 13 Aug 2012, 11:56 AM
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 >>
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Surya
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or