[Solved] Date string convertion wrong month


As you need please use below method. it will give you proper month formated date

func monthFormatechange(_ dateString : String) -> String
{

    let dateFormatter = DateFormatter()
    dateFormatter.dateFormat = "dd-MM-yyyy"
    let date = dateFormatter.date(from:dateString)
    dateFormatter.dateFormat = "dd-MMM-yyyy"
    let actualDate = dateFormatter.string(from: date!)
    return actualDate
}

solved Date string convertion wrong month