I have an endpoint in my Java program that returns a date variable of type Date. I'm calling this endpoint from a Swift program using Alamofire and receiving the response as a JSON object. the date that is getting returned is in the format: "2020-03-04 19:18:06.0" in Java. It gets received in my swift program as: "1583367486000"
I'm sure this is the seconds interval since a certain time period but how do I convert that to a Date format (lets say yyyy-mm-dd hh:mm:ss) in Swift?