Java SQL Date Get getDate(Timestamp establishdate)

Here you can find the source of getDate(Timestamp establishdate)

Description

Gets the date.

License

Apache License

Parameter

Parameter Description
establishdate the establishdate

Return

the date

Declaration

public static Date getDate(Timestamp establishdate) 

Method Source Code


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

import java.sql.Timestamp;
import java.util.Date;

public class Main {
    /**/*from w  ww  . j a va  2  s .c om*/
     * Gets the date.
     *
     * @param establishdate the establishdate
     * @return the date
     */
    public static Date getDate(Timestamp establishdate) {
        if (establishdate == null)
            return new Date();
        else {
            return new Date(establishdate.getTime());
        }
    }
}

Related

  1. getDate(String pattern)
  2. getDate(String strDate)
  3. getDate(String theDateStr, int days)
  4. getDate(String value)
  5. getDate(String year, String month, String day)
  6. getDate(Timestamp timestamp)
  7. getDate(Timestamp timestamp)
  8. getDate(Timestamp ts)
  9. getDateAddMonth(java.sql.Date date, int months)