Reputation: 614
I have an attribute with type Date
in my CoreData Model . That have the the data like
01/01/2012 13:37:00
, 01/01/2013 13:37:00
, 05/01/2012 13:37:00
,..
Now , I want to set the predicate that should fetch the dates which has the day 01 and month 01 regardless of the year.
I am able to fetch only the dates with between
in predicate.
Is there any way that I can filter these dates by its day and month ?
Upvotes: 1
Views: 651
Reputation: 119031
Not really, I don't think NSExpression can pull the date apart like that.
For this requirement you should update your entity so you store the day and month explicitly as well as having the full date so you can use these new attributes in your predicate.
Upvotes: 2