Java Timestamp Field getDateTimestamp(ResultSet rs, String columnLabel)

Here you can find the source of getDateTimestamp(ResultSet rs, String columnLabel)

Description

get Date Timestamp

License

Apache License

Declaration

public static Date getDateTimestamp(ResultSet rs, String columnLabel) throws SQLException 

Method Source Code

//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());
        }
    }
}

Related

  1. getDateString(Timestamp time, String pattern)
  2. getDateTime(Timestamp argRenDt)
  3. getDateTime(Timestamp timestamp)
  4. getDateTimeFromSqlTimestamp(Timestamp timestamp)
  5. getDateTimeFromTimeStamp(Timestamp timestamp)
  6. getDateTimeStr(Timestamp timestamp)
  7. getDateTimeString(java.sql.Timestamp ts)
  8. getDayBorder(Timestamp dateTime, Timestamp timeSlot, boolean end)
  9. getDayEnd(java.sql.Timestamp stamp, int daysLater)