Java Date to Long dateToLong(Date date)

Here you can find the source of dateToLong(Date date)

Description

Convert the date to a Long value.

License

Open Source License

Parameter

Parameter Description
date The given date.

Declaration

public static long dateToLong(Date date) 

Method Source Code


//package com.java2s;

import java.util.*;

public class Main {
    /**/*from  w w w  .ja v a 2  s.c  o  m*/
     * Convert the date to a Long value.
     * @param    date         The given date.
     */
    public static long dateToLong(Date date) {
        return date.getTime();
    }
}

Related

  1. dateToNumber(Date date)
  2. formatDateLong(Date date, Locale locale)
  3. formatDateToLong(Date date, String format)
  4. formatDateToLong(String strDate, String formatstr)