getTimeStamp « Resultset « Java Database Q&A





1. Java ResultSet how to getTimeStamp in UTC    stackoverflow.com

The database has data in UTC and when I try to get data

java.util.Calendar cal = Calendar.getInstance();
cal.setTimeZone(TimeZone.getTimeZone("UTC"));
java.sql.Timestamp ts = resultSet.getTimestamp(PUBLISH_TIME);
cal.setTime(ts);
Is there anything wrong with this?

2. ResultSet.getTimeStamp(1) is not work in some systems    stackoverflow.com

I have the code ResultSet.getTimeStamp(1) in one servlet. Am using JDK 1.6 and Tomcat 6. In my system its work fine.But in server which have same configuration ResultSet.getTimestamp(1) throws invalid column type. ...

3. Informix and ResultSet.getTimestamp()    coderanch.com