New topic: 

how to do spotlight query by creation date?

<http://forums.realsoftware.com/viewtopic.php?t=30646>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       shampden           Post subject: how to do spotlight query by 
creation date?Posted: Sun Oct 25, 2009 1:42 am                        
Joined: Tue Nov 29, 2005 1:03 am
Posts: 4              Hello all - I am trying to set up a spotlight search in 
RB which allows me to find all emails from a given day.  

  using the kMDItemContentType i can get a list of all email with the following 
search:
Code:Dim query as New SpotlightQuery("kMDItemContentType=""*mail*""")
however i'm at a loss how to structure the creationDate portion of the search 
since kMDItemContentCreation date appears to require the date passed to be of 
the type CFDate (see url to apples dev site below), yet it seems like i need to 
pass a simple string for the RB spotlightQuery.  when i try to add search 
criteria for date to the email, the search returns with no results.
Code:Dim query as New SpotlightQuery("kMDItemContentType=""*mail*"" && 
kMDItemContentCreationDate=""10/21/2009""")
any sugestions would be greatly appreciated!

thanks in advance,
stefan


>From Apples developer site listing searchable metadata attributes: 
Quote:http://developer.apple.com/mac/library/documentation/Carbon/Reference/MetadataAttributesRef/Reference/CommonAttrs.html
kMDItemContentCreationDate- The date and time that the content was created.
Value Type:  CFDate
Framework:  CoreServices/CoreServices.h
Header:  MDItem.h
Availability:  Available in Mac OS X v10.4 and later.   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to