Java SQL Date Get getDateFromTimestamp(Timestamp timestamp)

Here you can find the source of getDateFromTimestamp(Timestamp timestamp)

Description

get Date From Timestamp

License

Apache License

Parameter

Parameter Description
timestamp a parameter

Declaration

public static Date getDateFromTimestamp(Timestamp timestamp) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.Timestamp;

import java.util.Date;

public class Main {
    /**//from ww  w. j  av  a2s  .co  m
      * @param timestamp
      * @return
      */
    public static Date getDateFromTimestamp(Timestamp timestamp) {
        if (timestamp == null)
            return null;
        return new Date(timestamp.getTime());
    }
}

Related

  1. getDateForStr(String str)
  2. getDateFromISODateString(String isoDate)
  3. getDateFromLong(ResultSet resultSet, int index)
  4. getDateFromResultSet(ResultSet rset, Enum field)
  5. getDateFromRTGSDateString(String iobDate)
  6. getDateFromYMD(Date ymd)
  7. getDateInput(String prompt)
  8. getDateISO(final String sDate)
  9. getDateNextMonth(java.util.Date current)