private String getDateData(ResultSet rs, int column) throws SQLException {
        String res = null;
        ResultSetMetaData metaData = rs.getMetaData();
        int type = metaData.getColumnType(column);
        if (type == Types.DATE) {
            Date date = rs.getDate(column);
            res = date.toString();
        } else if (type == Types.TIME) {
            Time time = rs.getTime(column);
            res = time.toString();
        } else if (type == Types.TIMESTAMP) {
            Timestamp timeStamp = rs.getTimestamp(column);
            res = timeStamp.toString();
        } else if (type == Types.VARCHAR) {
            res = rs.getString(column);
        } else if (type == Types.DOUBLE || type == Types.FLOAT) {
            Double dbl = rs.getDouble(column);
            res = dbl.toString();
        }
        return res;
    }