Converting a date in MySQL format to human readable in Perl
Hi,
I have a variable, say $ary[3], which contains a MySQL date eg. "2001-1-19" for 19th Jan, 2001. How do I convert it in Perl to something more human, eg. "19th January, 2001"? Thanks. |
Take a look at the CPAN, in particular Class::Date or Date::Manip. There are lots of other time/date modules as well.
I got bored at work, so here's a quick example using Date::Calc: Code:
#!/usr/bin/env perl |
How about using MySQL date_format() fn: http://dev.mysql.com/doc/refman/5.0/...on_date-format
|
Quote:
|
Quote:
|
Quote:
jlinkels |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 11:33 AM. |