htmanning has asked for the wisdom of the Perl Monks concerning the following question:
The problem is %k shows up as 24 time. I'm having trouble figuring out how to get this back to 12 hour time if the hour is more than 12. Thanks!use DateTime qw( ); my $dt = DateTime->now( time_zone => 'Pacific/Honolulu' ); my $dateadded_time = $dt->strftime("%k:%M"); my $dateadded_date = $dt->strftime("%b %e, %Y");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 24 hour to 12 hour using DateTime
by kennethk (Abbot) on Aug 01, 2014 at 05:05 UTC | |
by htmanning (Friar) on Aug 01, 2014 at 08:30 UTC |