My problem is there is a switch in my app which toggles for 12 hour and 24 hour time format.I am displaying my labels time according to that, but the UIDatePicker
UIDatePicker
In Swift
// myDatePicker is yourUIDatePicker Outlet @IBOutlet weak var myDatePicker: UIDatePicker! // For 24 Hrs myDatePicker.locale = NSLocale(localeIdentifier: "en_GB") as Locale //For 12 Hrs timePickerView.locale = NSLocale(localeIdentifier: "en_US") as Locale