jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

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>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]