I have what I thought would be an easy thing to do / find on the Google-verse but have been totally baffled. I have a single object with two date properties setup in Core Data. I want to grab a list of objects where the two dates are not the same. How can I do this using Core Data?
[NSPredicate predicateWithFormat:@"dateModified != dateCreated"];
does not work.
The format you are using is searching for a key-value relation, but you have keys on both sides, dateModified
and dateCreated
. Try something like this:
[NSPredicate predicateWithFormat:@"(dateModified != %@)", someObject.dateCreated]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With