Re: Using date and time values in coredata
Re: Using date and time values in coredata
- Subject: Re: Using date and time values in coredata
- From: Daniel Vázquez <email@hidden>
- Date: Tue, 25 Apr 2006 10:52:39 -0500 (CDT)
Hi,
I have a NSTableView that will show dates that have
messages, only dates not time, and below it I would
have a NSTextView that will show all the messages from
the selected date orderer by time. Something very
simiar to chat history.
By group by I mean that how can I retreive from the
table all the messages from, lets say, 29/07/2002
ordered by time.
thanks
Erik
--- "I. Savant" <email@hidden> escribió:
>
> 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 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 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:
This email sent to email@hidden