|
|
sybperl-l Archive
Up Prev Next
From: cameron dot mellor at jpmorgan dot com
Subject: DBD::Sybase ISO date format returns January as "00"?!!
Date: Jan 27 2005 12:54PM
Sorry if this is trivial but I've done as much Googling as I can stand
without having turned up anything relevant.
I'm using "ISO" date format on a Sybase $dbh, but the month numbers are
coming back zero based (January is "00"). As I read ISO 8601 it *should* be
"01". Any clues? For example:
use DBI;
$attrs = { syb_date_fmt => "ISO" };
$dbh = DBI->connect( dsn, uid, pwd, $attrs );
$sth = $dbh->prepare( "select getdate()" );
$sth->execute();
print "now: ", $sth->fetch()->[0], "\n";
gives:
now: 2005-00-27 07:41:28.913
This is Perl 5.8.6, DBD::Sybase 1.05, Solaris 2.8, and the CT-Lib version
is (or seems to be):
Sybase Client-Library/11.1.1/P-EBF10536/DRV.11.1.1.1/sun_svr4/SPARC
Solaris 2.5.1/BUILD1111-026/OPT/Wed Aug 28 08:05:56 2002
TIA,
Cameron
This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates
|