[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Leading zero padding in time formats.
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>.