I want to show current time in an UILabel.To get current time I use following code
extension Date {
func toMillis() -> Int64! {
return Int64(self.timeIntervalSince1970 * 1000)
}
}
And use the function as:
let currentTime = Date().toMillis()
it returns a value of 18 digits like that 1533013044694
how could I convert it into human readable format.Is there any other way get current time and date?