On Mon, 1 Oct 2001, Philip Sheard wrote:
> > yes, look in the API :) Tim*() routines
> >
> > TimeToAscii
> > DateToAscii
>
> I roll my own. I could never get these to insert leading zeroes.
really? well.. you *should* be fine with code like this:
---
{
Char time[20];
DateTimeType date;
SystemPreferencesType systemPrefs; // clock variables
// get the current date/time
TimSecondsToDateTime(TimGetSeconds(), &date);
// get the users preferences
PrefGetPreferences(&systemPrefs);
// format the time to the localized preference
#ifdef DATE
DateToAscii(date.month, date.day, date.year,
systemPrefs.longDateFormat, time);
#else
TimeToAscii(date.hour, date.minute,
systemPrefs.timeFormat, time);
#endif
}
---
that way, you map to the user's preferences.. let them decide
if they have leading zero's or not. you can tweak the rest..
// az
[EMAIL PROTECTED]
http://www.ardiri.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/