Date Format for INFORMIX using DBI



Hi,

I am using the DBI to extract some data from the underlying Informix
Database. Even after doing the following when I am printing the value
for $start_date, it is in the format 'dd/mm/yyyy' instead of the
expected 'yyyy/mm/dd'. Can any of you advise as to why this is
happening..??


$sth = $dbh->prepare("select company,customer, pur_order, ref,
start_date, end_date, limit, on_billing, page_break, cons_usage,
cons_items, memo, pref_date, first_bill, igpm_adv,comment1, comment2,
comment3 from purchase_order");

($rv = $sth->execute);
$sth->bind_col(5, \$start_date, { TYPE => DBI::SQL_DATE });
while (($company,$customer, $pur_order, $ref,$limit, $on_billing,
$page_break, $cons_usage, $cons_items, $memo, $first_bill,
$igpm_adv,$comment1, $comment2, $comment3 ) = $sth->fetchrow)
{

print "\nStart Date is : ${start_date}\n" ;
}

Regards
Nitin Nair

.



Relevant Pages