Java SQL Date Get getDateAsLong(Timestamp date)

Here you can find the source of getDateAsLong(Timestamp date)

Description

Gets the date as long.

License

Open Source License

Parameter

Parameter Description
date the date

Return

the date as long

Declaration

public static long getDateAsLong(Timestamp date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;

public class Main {
    /**/*from  w w  w.  j a  va 2  s.  c o  m*/
     * Gets the date as long.
     *
     * @param date
     *            the date
     * 
     * @return the date as long
     */
    public static long getDateAsLong(Timestamp date) {
        return date == null ? -1 : date.getTime();
    }
}

Related

  1. getDate(Timestamp timestamp)
  2. getDate(Timestamp timestamp)
  3. getDate(Timestamp ts)
  4. getDateAddMonth(java.sql.Date date, int months)
  5. getDateAsLong(ResultSet rset, Enum field)
  6. getDateBefore(Date date, Integer before)
  7. getDateBeforTwelveMonth()
  8. getDateByNum(String dateNum)
  9. getDateByYearAndMonth(int year, int month)