in reply to Re^4: formatting datetime with strftimein thread formatting datetime with strftime
The order of your arguments is wrong, it should be
strftime(fmt, sec, min, hour, mday, mon, year) where mon begins at zero and year is since 1900.
my $datetimestring = "5/4/13 16:09";
my ($month,$day,$year,$hour,$min) = split /\D/,$datetimestring;
my $str = strftime("%b %d %Y %H:%M:%S", 0,$min,$hour,$day,$month-1,$y
Throwing nuclear weapons into the sun
Making everybody on Earth disappear
A threat from an alien with a mighty robot
A new technology or communications medium
Providing a magic fish to a Miss Universe
Establishing a Group mind
Results (166 votes). Check out past polls.