Hi!
I am developing an iPhone App with CoreData. One of my entities has an NSDate property named 'time'. It stores times to the minute/second. As my sections i'd like to have the date to the day. So if there are to entries '2010-06-14 8:00' and '2010-06-14 11:00', i'd like them to be grouped to '2010-06-14'.
Currently I just use @"time" as my sectionNameKeyPath:
NSFetchedResultsController *aFetchedResultsController =
[[NSFetchedResultsController alloc]
initWithFetchRequest:fetchRequest
managedObjectContext:managedObjectContext
sectionNameKeyPath:@"time"
cacheName:@"Root"];
Is there a trick to group by the time to the day? Or do I have to use plain SQL and something like "GROUP BY date(time, '%Y-%m-%d')
"?