Java Second Format getSecond(Date date)

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

Description

get Second

License

Open Source License

Declaration

public static String getSecond(Date date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

public class Main {

    public static String getSecond(Date date) {
        return FormatDate(date, "ss");
    }// w ww  . j  a  v  a 2  s .c o  m

    public static String FormatDate(Date date, String sf) {
        if (date == null)
            return "";
        SimpleDateFormat dateformat = new SimpleDateFormat(sf);
        return dateformat.format(date);
    }
}

Related

  1. getIntervalMilSeconds(String startDateStr, String endDateStr, String dateFormat)
  2. getMisSecond(String strDate)
  3. getSecond()
  4. getSecond()
  5. getSecond()
  6. getSecond(String time)
  7. getSeconds(long time)
  8. getSecondsFormatter()
  9. getSecondsSince(String rfc1123Date)