jaco-g
8/5/2017 - 4:08 PM

Date Formatter

let st = "20170713 111326"

let dateFmt = DateFormatter()
dateFmt.dateFormat = "yyyyMMdd HHmmss"

if let date = dateFmt.date(from: st) {

    dateFmt.dateFormat = "dd/MM/yyyy HH:mm a"
    let finalDate = dateFmt.string(from: date))
}