在querybrowser i中执行以下查询时,我得到了正确的日期。但是在jdbc代码中,结果集返回的日期不正确。
pstmt = con.prepareStatement("select DATE(sih.loaded_date) from tab_ats_sellthroughloader_history sih order by loaded_date desc limit 1");
rs = pstmt.executeQuery();
java.sql.Timestamp saveDate = null;
while (rs.next()) {
saveDate = rs.getTimestamp(1);
}
System.out.println("result:::::::::::::::::"+saveDate);