Greetings, On Thursday, January 31, 2002, at 08:17  PM, Pradeep 
Sethi wrote:

> Hi All,
>
> I want to change date 9/9/1987 to 09/09/1973

You want to change 1987 to 1973 ?

> was wondering, what is the most efficient way ?

# Assuming:
my ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime;

# Then -
my $vdate = sprintf("%02d", $mon + 1) . '/' . sprintf("%02d", $mday);
$vdate .=  '/' . ($year += 1900);

print $vdate; # prints 01/31/2002 or say 01/01/2002

and so on for whichever combinations of month/day/year...

Or a basic program example:
http://cpan.valueclick.com/authors/id/S/SN/SNEEX/msg_log.perl_v8s


No, I am not ignoring the 'efficient' part, but felt this was good 
starting spot;
HTH/Sx  :]

Reply via email to