in reply to formatting datetime with strftime
Time::Piece, (was first released with perl v5.9.5), would solve this simply.
Prints Apr 05, 2013 16:09:00#!/usr/bin/perl use strict; use warnings; use Time::Piece; my $datetimestring = "4/5/13 16:09"; my $t = Time::Piece->strptime($datetimestring, "%m/%d/%y %H:%M"); print $t->strftime("%b %d, %Y %H:%M:%S");
Chris
|
---|
In Section
Seekers of Perl Wisdom