Java Date to Second getSecond(Date date)

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

Description

get Second

License

Open Source License

Declaration

public static int getSecond(Date date) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static final int SECOND = 1;

    public static int getSecond(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);/*ww  w  .j a v a 2s. c om*/
        return c.get(Calendar.SECOND);
    }
}

Related

  1. getSecond(Date d)
  2. getSecond(Date date)
  3. getSecond(Date date)
  4. getSecond(java.util.Date date)
  5. getSecondOfDate(Date date)
  6. getSecondOfMinute(final Date date)