MySQL Forums
Forum List  »  Perl

Re: date conversion
Posted by: Randy Clamons
Date: March 18, 2009 11:10AM

How about something like this:

my %months = ('Jan' => '01', 'Feb' => '02', 'Mar' => '03',....);

my @date = split(' ','Wed Mar 28 00:00:00 GMT+02:00 2007');

my $date = "$date[5]-$month{$date[1]}-$date[2]";

Options: ReplyQuote

Written By
March 18, 2009 08:48AM
Re: date conversion
March 18, 2009 11:10AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.