on 8/29/00 1:43 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote:
> I'm something of a newbie at this, so I apologize if I'm
> wasting time with a basic question...
> (but here goes anyway ;-)
> I am writing an app that stores records in a database.
> Each record includes a date. I'me using the
> DateTimeType. What's the best way to store that date in
> my record? Should I pack up the year, month and day as
> CharPtr's, or should I store the numebr of seconds since
> my grandmother was born (1/1/1904... not really)? What
> other options
I usually store the date as seconds since the Palm epoch (1/1/1904):
a. Fast: easy to sort by date
b. Small: 4 bytes of storage
c. Flexible: You can use the user's prefs to format the date (and/or time)
according to their formatting preferences.
-JB
----------------------------------------------
JB Parrett [EMAIL PROTECTED]
Palm, Inc.
We grow a lot faster than trees,
so we miss a lot of stuff. - B. Andreas
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/