do $date = sprintf("%04d%02d%02d", $year,$mday,$mon);
btw, yyyyddmm is not sortable, you may want to use yyyymmdd. George On Saturday, July 13, 2002, at 05:38 PM, Steve wrote: > I have this snippet of code: > > > use warnings; > use strict; > use diagnostics; > my $date; > my $base_url; > my $full_url; > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst); > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); > $year+=1900; > $date = $year.$mday.$mon; > > $date is getting concatennated with 2002136 and I need 20021306. > > I've done a perldoc -f localtime but no joy. How do I get the day to > be two > digit? > > > -- > Steve > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > // George Schlossnagle // Principal Consultant // OmniTI, Inc http://www.omniti.com // (c) 240.460.5234 (e) [EMAIL PROTECTED] // 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0