Here you can find the source of getDateTimestamp(ResultSet rs, String columnLabel)
public static Date getDateTimestamp(ResultSet rs, String columnLabel) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Date; public class Main { public static Date getDateTimestamp(ResultSet rs, String columnLabel) throws SQLException { Timestamp timestamp = rs.getTimestamp(columnLabel); if (timestamp == null) { return null; } else {//w ww .j a va2 s. c o m return new Date(timestamp.getTime()); } } }