My issue is trying to convert a Date Picker result into a unix timestamp. My client is adamant that it'd be saved as a unix timestamp into Firebase database. Im also quite new to the swift so...
let myTimeStamp = NSDate(timeIntervalSince1970: self.datePicker?.date)
You already have the
Date. Since you want the timestamp, call:
let myTimeStamp = self.datePicker?.date.timeIntervalSince1970
myTimeStamp will be an
NSTimeInterval with a value in Unix time.