in reply to Date conversion with Class::DBI
See the MySQL docs for the DATE_FORMAT() function. That gives a formatted date similar to POSIX::strftime. For example,
$sth = $dbh->prepare <<EOSQL; select DATE_FORMAT(The_Date_Col, '%d/%m/%Y') from the_table where Some_key = ? EOSQL
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Date conversion with Class::DBI
by bsb (Priest) on Jul 07, 2003 at 04:09 UTC |