make your %4d-%2d-%2d look like %4d-%02d-%02d The zero with the number says
to have zero fill instead of blank fill.
Wags ;)
-----Original Message-----
From: Derrick (Thrawn01) [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 07:57
To: Perl Beginners
Subject: printf to convert 200010809 to 2001-08-09
@data[0]->[17] contains "20010809"
I've been tring to use printf to convert the 200010809 value out as
2001-09-08
$last_open = sprintf "%4d-%2d-%2d",@data[0]->[17];
However this does not work. I get "20010809- 0- 0"
Any sugesstions on how I should make this converstion with out adding alot
of overhead doing it ?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]