• 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
Re: NSMetadataQuery question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMetadataQuery question


  • Subject: Re: NSMetadataQuery question
  • From: Timothy Larkin <email@hidden>
  • Date: Mon, 20 Oct 2008 06:35:57 -0400

There is only one way I have figured out to have a date as the RHS of a predicate, which I found by looking at an example of a date predicate produced by IB as part of a predicate binding. The date has to be cast to a float. This

[NSString stringWithFormat:@"CAST(%f, \"NSDate\")", [date timeIntervalSinceReferenceDate]];

produces a string which can be used to build a predicate.

--
Timothy Larkin
Abstract Tools
Caroline, NY

On Oct 19, 2008, at 9:39 PM, Timothy Reaves wrote:

I'm trying to write a query where the meta data in question is an NSDate stored as a binary plist. Everything I am doing is failing. I have tried '(myKey > %@, date] where date is an instance of NSDate, where it is a NSTimeInterval, and a string. Nothing returns data (or even calls my callback).


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________

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

References: 
 >NSMetadataQuery question (From: Timothy Reaves <email@hidden>)

  • Prev by Date: Re: stringWithFormat
  • Next by Date: Custom button cells for NSMatrix
  • Previous by thread: NSMetadataQuery question
  • Next by thread: What's the modern solution for sharing data between Cocoa to Windows
  • Index(es):
    • Date
    • Thread