I am currently using the below mentioned code to access a date column in parse and display in my custom tableview controller.
if var x = object?["columnName"] as? String {
cell.Name.text = x;
}
One of the columns is a date field. Hence i tried with
if var lastModifiedTime = object?["columnName"] as? NSDate {
var dateFormat = NSDateFormatter()
dateFormat.dateFormat = "EEE, MMM d, h:mm a"
cell.LastModifiedTime.text = NSString(format: "%@", dateFormat.stringFromDate(lastModifiedTime)) as String;
}
But the var is taking no values. I have checked in parse and the column type is Date. Can anyone please tell where am i going wrong