in reply to Convert Date formats
In this case though, NOV-07 was too ambiguous for str2time. Adding 1- to make 1-NOV-07 fixed it.
#!/usr/bin/perl use warnings; use strict; use Date::Format; use Date::Parse; my $thingy = q{NOV-07}; my $time = str2time(qq{1-$thingy}); my $date = time2str(q{%Y/%m}, $time); print $date;
2007/11
|
|---|