I have strings and converting into the date format, but when I convert after the date is showing properly but time is showing the wrong format
firsDateString : 2019-Mar-15 9:00 AM
secondName : 2019-Mar-15 8:00 PM
String convert into the date format
let addedDate = firsDateString
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MMM-dd hh:mm a"
let date1 = formatter.date(from: addedDate)
print("DATE \(date1)")
After that am getting this values:
DATE Optional(2019-03-15 03:30:00 +0000)
How can get the correct date format?