All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>

  • Constructor Summary

    Constructors

    Timestamp(int year, int month, int date, int hour, int minute, int second, int nano)

    Timestamp(long time)

    Constructs a Timestamp object using a milliseconds time value.

  • Method Summary

    boolean

    Indicates whether this Timestamp object is later than the given Timestamp object.

    boolean

    Indicates whether this Timestamp object is earlier than the given Timestamp object.

    int

    Compares this Timestamp object to the given Timestamp object.

    int

    Compares this Timestamp object to the given Date object.

    boolean

    Tests to see if this Timestamp object is equal to the given object.

    boolean

    Tests to see if this Timestamp object is equal to the given Timestamp object.

    Obtains an instance of Timestamp from an Instant object.

    int

    getNanos()

    Gets this Timestamp object's nanos value.

    long

    getTime()

    Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Timestamp object.

    int

    hashCode()

    Returns a hash code value for this Timestamp.

    void

    setNanos(int n)

    Sets this Timestamp object's nanos field to the given value.

    void

    setTime(long time)

    Sets this Timestamp object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.

    toInstant()

    Converts this Timestamp object to an Instant.

    Converts this Timestamp object to a LocalDateTime.

    toString()

    Formats a timestamp in JDBC timestamp escape format.

    Converts a String object in JDBC timestamp escape format to a Timestamp value.

    Obtains an instance of Timestamp from a LocalDateTime object, with the same year, month, day of month, hours, minutes, seconds and nanos date-time value as the provided LocalDateTime.

    Methods declared in class Date

    after, before, clone, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC

    boolean

    Tests if this date is after the specified date.

    boolean

    Tests if this date is before the specified date.

    Return a copy of this object.

    int

    int

    int

    int

    int

    int

    int

    int

    static long

    void

    void

    void

    void

    void

    void

    static long

    UTC(int year, int month, int date, int hrs, int min, int sec)

    Methods declared in class Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Constructor Details

    • Timestamp

    • Timestamp

  • Method Details

    • setTime

    • getTime

    • valueOf

    • toString

    • getNanos

    • setNanos

    • equals

    • equals

    • before

    • after

    • compareTo

    • compareTo

    • hashCode

    • valueOf

    • toLocalDateTime

    • from

    • toInstant