oli2121 Posted March 24, 2010 Share Posted March 24, 2010 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) 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 Link to comment https://forums.phpfreaks.com/topic/196356-odbc-sage-line-50-date-fields-create-strange-characters-in-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.