var dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:00"
let strDate = dateFormatter.stringFromDate(datePicker.date)
let date = dateFormatter.dateFromString(strDate)
let calendar = NSCalendar.currentCalendar()
let comp = calendar.components([.Day, .Month, .Year, .Hour, .Minute, .Second], fromDate: date!)
let day = comp.day
let month = comp.month
let year = comp.year
let hour = comp.hour
let minute = comp.minute
let second = comp.second
------
let date = NSDate()
let calendar = NSCalendar.currentCalendar()
let components = calendar.components([.Day , .Month , .Year], fromDate: date)
let year = components.year
let month = components.month
let day = components.day
print(year)
print(month)
print(day)