Java Second Convert toSeconds(long milliseconds)

Here you can find the source of toSeconds(long milliseconds)

Description

This method strips milliseconds and returns seconds.

License

Apache License

Parameter

Parameter Description
milliseconds a parameter

Declaration

private static long toSeconds(long milliseconds) 

Method Source Code

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

public class Main {
    /**// w  w  w  . j a  va2  s .co m
     * This method strips milliseconds and returns seconds.
     *
     * @param milliseconds
     * @return
     */
    private static long toSeconds(long milliseconds) {
        return milliseconds / 1000;
    }
}

Related

  1. toHhMmSs(long seconds)
  2. toNanoseconds(long sec, long nanos)
  3. toSeconds(double value)
  4. toSeconds(long date)
  5. toSeconds(long millis)
  6. toSeconds(long nanoseconds)
  7. toSeconds(long nanoSeconds)
  8. toSecondsPrecisionInMs(long ms)
  9. toTimeStringNoSeconds(Date timeString)