MATLAB: Do I receive a Java object signature (instead of a time) when I query for fields of TIMESTAMP type in an Oracle 10.2.0 database with Database Toolbox 3.3 (R2007a)

Database Toolbox

I am able to work normally with an Oracle (10.2.0) database through a JDBC connection. I am able to retrieve strings and number from the database, but get a problem when I query for the fields of the TIMESTAMP type. Instead of a time it returns the following string: 'oracle.sql.TIMESTAMP@37d830'. To me this seems like a Java object signature. I get the same result with just code or using the querybuilder. Can you explain how I can obtain timestamps from an Oracle database?
conumber = 427450;
query =['SELECT PJ_OPENINGPROJECT FROM PROJECTEN WHERE PJ_PROJECTNR = ', num2str(conumber)];
curs = exec(conn, query);
curs = fetch(curs);
time =curs.DATA{1}
When I query the 'typeValue' field via code such as the following, it is 93:
a = attr(curs);
a.typeValue

Best Answer

Type 93 is normally mapped to java.sql.TIMESTAMP, and the 'toString' method converts this to a readable date. oracle.sql.TIMESTAMP is different and Oracle- specific. The 'toString' method for this object type just converts the object name to a string.
To workaround the issue, recast the oracle.sql.TIMESTAMP field to a java.sql.TIMESTAMP or "char". The SQL statement would appear as something like:
SELECT to_char(PJ_OPENINGPROJECT,'MM/DD/YYYY HH24:MI:SS') "NewDate" FROM PROJECTEN