• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data Predicate Builder - comparing dates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data Predicate Builder - comparing dates


  • Subject: Core Data Predicate Builder - comparing dates
  • From: Steve Cronin <email@hidden>
  • Date: Fri, 28 Aug 2009 01:33:34 -0500

Folks;

I have a Core Data entity that has a dateCreated and a dateModified - both NSDates in the object files.
I'd like to construct a predicate that will retrieve all records where a record's dateModified is greater than that record's dateCreated.


Its deceptively easy to setup something that looks like it should work using 'Control-click' and 'Key' in the predicate builder in XCode.
But when I run queries it doesn't appear to yield the right results.
My thinking is that the comparison operators don't properly evaluate dates (am I wrong?)


So dropping back to code - how would I write this predicate in code?

Thanks for any help!
Steve

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Drawing Text in an NSImage
  • Next by Date: core-data app design question
  • Previous by thread: Re: creating registration codes
  • Next by thread: re: Core Data Predicate Builder - comparing dates
  • Index(es):
    • Date
    • Thread