RE: help with printf formatting please

2001-08-09 Thread Yacketta, Ronald
Thanxs! I was thinking I had to use a float > -Original Message- > From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 09, 2001 11:35 > To: Yacketta, Ronald > Cc: Beginners (E-mail) > Subject: Re: help with printf formatting please > &g

Re: help with printf formatting please

2001-08-09 Thread Brett W. McCoy
On Thu, 9 Aug 2001, Yacketta, Ronald wrote: > I do not get the 0 as in 09 , 08, 07 ,06 etc.. > > what could I do to ensure that the $sec is _always_ 2 digits? Precede your format specifier with 0#: ~$ perl -e 'printf("%02d\n", 6);' 06 ~$ perl -e 'printf("%03d\n", 6);' 006 -- Brett