Java Long Number to Time convertTimestampToSec(long timestampInMs)

Here you can find the source of convertTimestampToSec(long timestampInMs)

Description

Converts specified timestamp in milliseconds to seconds.

License

Apache License

Declaration

public static long convertTimestampToSec(long timestampInMs) 

Method Source Code

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

public class Main {
    /**/*from w w  w .ja  v  a2 s  .  co  m*/
     * Converts specified timestamp in milliseconds to seconds.
     */
    public static long convertTimestampToSec(long timestampInMs) {
        return Math.round(timestampInMs / 1000d);
    }
}

Related

  1. convertTime(long time)
  2. convertTime(long time)
  3. convertTime(long time)
  4. convertTime(long value)
  5. convertTime(long x)
  6. convertTimestampToUTCString(final long aTimestamp)
  7. convertTimeToInt(long seconds)
  8. convertTimeToString(final long time)
  9. convertTimeToString(final long timeInMillis)