I have an array of strings that have been converted from a date into a String from Parse like this:
var createdAt = object.createdAt
if createdAt != nil {
let date = NSDate()
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "MM/dd/YYY/HH/mm/ss"
let string = dateFormatter.stringFromDate(date)
let arrayOfCompontents = string.componentsSeparatedByString("/")
let dateTimeString = dateFormatter.stringFromDate(createdAt as! NSDate!)
self.timeCreatedString.append("\(arrayOfCompontents[0...2])")
I'm appending to an Array called timeCreatedString.
When I print to the logs the output is: ["[\"10\", \"26\", \"2015\"]"]
And when I put it on a UILabel I get this: ["10", "26", "2015"]
Is there a simple way to remove the brackets, quotes and commas from a swift array and replace it with something else (or nothing)?