"Wade Guthrie" <[EMAIL PROTECTED]> wrote in message
news:67815@palm-dev-forum...
>
> At 02:39 PM 11/13/2001 -0800, Tod Cary wrote:
> >I want to pad a date with zeros so that it is always 8 characters and
I
> >am not sure how to do that within the Palm OS.
> >
> >Example:
> >
> >3/2/01 to 03/02/01
>
> I think what you're looking for is:
>
> StrPrintF (string, "%02d/%02d/%02d", day, month, year%100);

Note that the "0" pad doesn't work on all versions of Palm OS -- that
format specified was added in Palm OS 3.0, IIRC.

You might have more luck just using DateToAscii to format your time,
then you'd respect the formats the user sets.  DateTemplateToAscii also
can be pretty useful.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to