Java Date to Timestamp timestampSec(Date date)

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

Description

timestamp Sec

License

Apache License

Declaration

public static String timestampSec(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String timestampSec(Date date) {
        final SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyyMMdd-HHmmss");
        return dateFormat.format(date);
    }//from  w w  w .ja va 2 s .  co m
}

Related

  1. removeTimestamp(Date date)
  2. timestamp(Calendar date)
  3. timestamp(Date d)
  4. timeStamp(Date date)
  5. timestamp(Date dateAndTime)
  6. TimestampToString(Date thisdate)
  7. toDate(String timeStamp)
  8. toDateStringFromResources(String timestamp)
  9. toDateTime(String timeStamp)