• 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: Using date and time values in coredata
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using date and time values in coredata


  • Subject: Re: Using date and time values in coredata
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 25 Apr 2006 10:52:01 -0400


Date and time are the same thing in Cocoa. After all, a span of time (or point in time) is just a more precise date, right?


You should probably have two columns, both bound to the same "date" property. Just use a date formatter (see NSDateFormatter) to make one column display only the "date" string and the other display only the "time" string.

If you sort by either column, the sorting should be the same, I would imagine. Perhaps I don't understand what you mean by 'group by'.

--
I.S.


On Apr 25, 2006, at 10:48 AM, Daniel Vázquez wrote:

Hi, I have a couple of newbie questions about
coredata.
I have a problem with one of my tables. I want to save
the date and time of a message, in SQL I would do a
DATE column and a TIME column so I can group by date
and order by time. How can this be acomplish in
Coredata? Should I use two NSDate columns? How can I
group the messages by date as there is no GROUP BY
statement in Coredata? Do I have to loop manually and
compare dates and time from the result array of the
NSFetchRequest?


thanks Daniel





___________________________________________________________
Do You Yahoo!?
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Using date and time values in coredata
      • From: Daniel Vázquez <email@hidden>
References: 
 >Using date and time values in coredata (From: Daniel Vázquez <email@hidden>)

  • Prev by Date: Using date and time values in coredata
  • Next by Date: Re: Animated split view collapsing
  • Previous by thread: Using date and time values in coredata
  • Next by thread: Re: Using date and time values in coredata
  • Index(es):
    • Date
    • Thread