Jump to content

ODBC sage line 50, date fields create strange characters in php


oli2121

Recommended Posts

Im having problems with getting dates out of an odbc connection (sage).

 

Here is a example.

$dbh = odbc_connect('SageLine50v16', "manager", "");

 

$sql="SELECT RECORD_CREATE_DATE FROM COMPANY";

$result_data = odbc_exec($dbh,$sql);

while ($row = odbc_fetch_array($result_data)) {

echo $row['RECORD_CREATE_DATE'];

}

 

On my browser it produces 201ger!<REC (with the arrow filled in style)  :confused: when opened to view source it just shows 201, so I belive it to be a unrecognised character set.

 

when the odbc connection is opened via Microsoft Access it converts the date correctly to "14/03/2010 12:39:01" . Is there a way at the SQL level or php level to convert this to a readable string. Anyones help on this would be greatly appreciated. Has anyone had this problem before?

 

All the best.

Oli

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.