I'm trying to create an alarm clock app for iOS, Im new to Swift. I want to know how to get only the time from the UIDatePicker. Till now, I have a code which just gives the entire date with time. `import UIKit
class ViewController: UIViewController {
@IBOutlet weak var alarmTime: UIDatePicker!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func alarmTime(_ sender: UIDatePicker){
sender.datePickerMode = UIDatePickerMode.time
print(sender.date)
}
} ` Here is the screenshot of the output of the above code in the terminal