Predicate optional question


I have a realm object that I want to filter on an optional date property. Sometimes I want to show the items that have a date, sometimes I will want to show the ones that don’t. I don’t care what the value is just whether is exists or not. I’m pretty new to predicates and I can’t figure this out. Is this doable?


Yes, it is doable and its more simple than you think.

NSPredicate *eventWithNoEndDate = [NSPredicate predicateWithFormat:@"endDate = nil"];