small medium large xlarge

Back to: All Forums  Core Data
Generic-user-small
03 Sep 2009, 15:30
Matt Stephens (3 posts)

I’m working on an iPhone app and considering using Core Data over straight sqlite so i am working through the book but so far can’t see how to do this:

I have a NSDate attribute on an entity and all entities will fall inside the last 6 months. I want to use the NSFetchedResultsController to provide sections for the month name but there seems to be no date manipulation constructs to give me just the month name from NSDate attribute.

I am new to Cocoa so maybe i’m missing something that should be obvious?

Thanks

Matt

Avatarsmall_pragsmall
13 Sep 2009, 04:21
Marcus S. Zarra (284 posts)

There is no way to access just the month but you can do a predicate that compares a date value against start and end dates like @startDate <= %@ AND endDate >= %@@

You must be logged in to comment