Java Timestamp Convert To timestampToDayNumber(long timestamp)

Here you can find the source of timestampToDayNumber(long timestamp)

Description

timestamp To Day Number

License

Open Source License

Declaration

public static short timestampToDayNumber(long timestamp) 

Method Source Code

//package com.java2s;

public class Main {
    public static short timestampToDayNumber(long timestamp) {
        long result = timestamp / (1000 * 60 * 60 * 24);
        if (result < 0 || result > Short.MAX_VALUE) {
            throw new IllegalArgumentException("Wrong date input '"
                    + result + "'");
        }//from w  w w .  jav a 2s .  com
        return (short) result;
    }
}

Related

  1. timestampToDate(java.sql.Timestamp ts)
  2. timeStampToDate(Timestamp tim)
  3. timestampToDate(Timestamp tt)
  4. TimestampToDateStr(Timestamp tmp)
  5. timestampToDateString(Timestamp ts)
  6. timestampToInternal(java.sql.Timestamp ts)
  7. timestampToLong(Timestamp ts)
  8. timestampToMicros(Timestamp timestamp)
  9. timestampToParts(long time)