- Subject: Re: Leading zero padding in time formats.
- From: "John E. Davis" <davis>
- Date: Tue, 14 Jan 2003 13:56:34 -0500
Morten Bo Johansen <mojo@xxxxxxxx> wrote:
>The line to get the date and time looks like this:
>
>
> variable tm = sprintf ("%d-%d-%d %d:%d", 1900 + tm.tm_year, 1+tm.tm_mon,
> tm.tm_mday, tm.tm_hour, tm.tm_min);
Use %02d instead of %d to get a leading 0.
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]