# Get batch date and Ord range
open OR,$ARGV[2];
while (<OR>) { # find the batch date
next if length $_ < 3; # BLANK LINE
# last if $. > 120; # sample should be good enough
(undef,undef,undef,undef,$batch_date,$oId,undef)=split(/,/,$_,);
$dates{$batch_date}++;
$firstOrder ||= $ordId;
}
close OR;
@maxdates = sort{$dates{$b} <=> $dates{$a}} keys %dates;
$batch_date = shift @maxdates;
undef @maxdates;
so whatever i am catching batch_date from $ARGV[2];
that is interms of date+time
eg:2011-05-20 07:38:28
i want that batch date should be only contain date 2011-05-20
I cant change the file so plz tell me how can i do this, so that in next step i can use maxdate (@maxdates = sort{$dates{$b} <=> $dates{$a}} keys %dates;)