the below post answered half of my question, but I still need to extract only the date without the time of the corrected date, would you kindly help me guys: xcode in swift datepicker picks wrong date
Asked
Active
Viewed 62 times
-1
-
datePicker.datePickerMode = UIDatePickerModeDate; – Bharat Nov 03 '15 at 08:27
1 Answers
0
I could finally find a function that combines using locale time and getting the short format of the date only. below is what I used.
@IBAction func DateChanged(sender: UIDatePicker) {
let dateFormatter = NSDateFormatter.localizedStringFromDate(DatePicker.date, dateStyle: NSDateFormatterStyle.ShortStyle, timeStyle: .NoStyle)
print(" Date: " + dateFormatter)
}

nasser
- 9
- 6