I'm querying the createdAt column from Parse.
My Parse methods are above this code and then I'm doing this:
var createdAt = object.createdAt
if createdAt != nil {
let twentyFourHours = NSTimeInterval(60 * 60 * 24)
self.expiresAt = NSDate(timeInterval: twentyFourHours, sinceDate: (createdAt!!))
}
I am querying many dates from Parse. However, I'm unable to store them in createdAt
because createdAt
is of type NSDate?
.
I need to make an array, but I can't figure out how to store many NSDate values so that I can compare them.
How can I store the values I'm querying and put them into an array so that I can compare many createdAt
dates with the NSTimeInterval
method using this method: NSDate(timeInterval: twentyFourHours, sinceDate: (createdAt!!))
?
Am I using the correct function?
Thanks in advance.