in reply to Re^17: Sybase BCP date formatter
in thread Sybase BCP date formatter

You probably don't even want to use sprintf if you don't want leading zeroes. Just use double quotes. Try this:
my $x = 1; my $y = 2; my $str1 = sprintf "%02d %02d\n", $x, $y; print "$str1\n"; my $str2 = "$x $y"; print "$str2\n";
I agree with Corion though, that the date format ought to be YYYY-mm-dd if at all possible. I guess it depends on what you're using the date for...

Replies are listed 'Best First'.
Re^19: Sybase BCP date formatter
by LangeNet (Initiate) on Dec 18, 2008 at 14:15 UTC
    Folks,
    Thanks for responding.. I need to verify the format requirement - thanks to all for your help and patience. Robert