Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

willemVP

macrumors newbie
Original poster
Aug 4, 2011
7
0
I have a project that uses RestKit & Core Data to manage my data.
What I'm trying to do is to get all the records for a specified date regardless the time. I have a Data attribute in Core Data which has dates stored like 2011-11-14 13:30:00. I don't care about the time for now, I only want the records with the same date as 2011-11-14.

How do I do this?
 
I have a project that uses RestKit & Core Data to manage my data.
What I'm trying to do is to get all the records for a specified date regardless the time. I have a Data attribute in Core Data which has dates stored like 2011-11-14 13:30:00. I don't care about the time for now, I only want the records with the same date as 2011-11-14.

How do I do this?

Date >= 2011-11-14 00:00 && Date < 2011-11-15 00:00
 
That's how I fixed for now. But isn't there an easier way like: day(myDate) == day(myCompareDate)?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.