Tom Coomer
Tom Coomer

Reputation: 6547

Parse.com Query for future date

I would like to query Parse.com and look for events in the future. Currently I am getting every object then comparing the date from the Parse.com object with Todays date in the app and display only the future events. This means that it is running slowly. I was wondering how I should compare the dates in the query.

Any suggestions? Thanks

Upvotes: 0

Views: 158

Answers (1)

danh
danh

Reputation: 62676

PFQuery provides all of the inequality operators (greaterThan, lessThan, greaterThanOrEqualTo, lessThanOrEqualTo), so the future looks like:

[query whereKey:@"myDateCol" greaterThan:[NSDate date]];

Upvotes: 1

Related Questions