C
cc96ai
I want to change the date format in perl script
input: "2005-11-01"
output:November 1, 2005
thanks
input: "2005-11-01"
output:November 1, 2005
thanks
cc96ai said:I want to change the date format in perl script
input: "2005-11-01"
output:November 1, 2005
cc96ai said:I want to change the date format in perl script
input: "2005-11-01"
output:November 1, 2005
thanks
Greg said:use Date:arse qw/ strptime /;
use POSIX qw/ strftime /;
# output:November 1, 2005
my $date = "2005-11-01";
my(undef,undef,undef,$day,$month,$year) = strptime $date;
print strftime("%B %e, %Y\n", 0, 0, 0, $day, $month, $year);
I want to change the date format in perl script
input: "2005-11-01"
output:November 1, 2005
thanks
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.