[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 might I have that I haven't thought of?
My solution to this problem was the following:
Each record in the database has a header with details about the size and positions of
data in the rest of the record. I just tacked
a DateTimeType struct into the header along with everything else. I access it the same
ay I do with the strings that are also in
the record - passing around pointers to the position in the record that the data
starts at.
Good luck.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/