I\'m trying to fetch from Core Data records that have a startTime between two dates.
Here\'s my code:
NSDate *today = [NSDate date];
NSDate *distantF
According to the documentation, the BETWEEN operator counts as an aggregate expression, and ...
Aggregate expressions are not supported by Core Data.
So yes, in order to work around this, you must use the >= and <= construction.
However, given that one of your dates is [NSDate distantFuture], you don't need the "less than" comparison at all. You should be able to do:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"startTime >= %@", [NSDate date]];