• 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: filterArrayWithQualifier: how do i set a fetch for timestamp for one day?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filterArrayWithQualifier: how do i set a fetch for timestamp for one day?


  • Subject: Re: filterArrayWithQualifier: how do i set a fetch for timestamp for one day?
  • From: "email@hidden" <email@hidden>
  • Date: Sat, 7 Jun 2003 16:57:14 +0200

yeah!

thanx a lot Art,

i didn't think about that solution!

cheers christian




On Thursday, June 5, 2003, at 09:59  AM, email@hidden wrote:

i am developing a web-application with messages in an openbase database.
these messages have a NSTimestamp value with the time it was written.
i want to make a search on these messages and with text-search it
worked.


how can i filter objects that are written on one day?
i tried to use:

searchdate = new NSTimestamp(ayear, amonth, aday, 0, 0, 0, atimezone);
qualsearch = EOQualifier.qualifierWithQualifierFormat ("timestamp = '"+
searchdate()+"'", null);
EOQualifier.filterArrayWithQualifier(messageList, qualsearch);

The above should work if your timestamps are precise to no less than a day; i.e., the hours, minutes, seconds, milliseconds are 0.


But if your timestamps are precise to the millisecond, then you'd need to use a qualifier for a timestamp range.

searchdateStart = new NSTimestamp(ayear, amonth, aday, 0, 0, 0, atimezone);
searchdateEnd = searchdateStart.timestampByAddingGregorianUnits(0, 0, 1, 0, 0, 0);
qualsearch = EOQualifier.qualifierWithQualifierFormat ("timestamp >= %@ and timestamp < %@", new NSArray(new NSTimestamp[] {searchdateStart, searchdateEnd}));


Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Javamonitor does not work since i once used it!!!
  • Next by Date: Re: Picking up .wo changes
  • Previous by thread: Re: Javamonitor does not work since i once used it!!!
  • Next by thread: Anyone Using 9iAS?
  • Index(es):
    • Date
    • Thread