Java java.sql Timestamp fields, constructors, methods, implement or subclass

Example usage for Java java.sql Timestamp fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.sql Timestamp.

The text is from its open source code.

Subclass

java.sql.Timestamp has subclasses.
Click this link to see all its subclasses.

Constructor

Timestamp(long time)
Constructs a Timestamp object using a milliseconds time value.

Method

booleanafter(Timestamp ts)
Indicates whether this Timestamp object is later than the given Timestamp object.
booleanbefore(Timestamp ts)
Indicates whether this Timestamp object is earlier than the given Timestamp object.
Objectclone()
Return a copy of this object.
intcompareTo(Timestamp ts)
Compares this Timestamp object to the given Timestamp object.
intcompareTo(java.util.Date o)
Compares this Timestamp object to the given Date object.
booleanequals(Timestamp ts)
Tests to see if this Timestamp object is equal to the given Timestamp object.
booleanequals(java.lang.Object ts)
Tests to see if this Timestamp object is equal to the given object.
Timestampfrom(Instant instant)
Obtains an instance of Timestamp from an Instant object.
ClassgetClass()
Returns the runtime class of this Object .
intgetDate()
Returns the day of the month represented by this Date object.
intgetDay()
Returns the day of the week represented by this date.
intgetHours()
Returns the hour represented by this Date object.
intgetMinutes()
Returns the number of minutes past the hour represented by this date, as interpreted in the local time zone.
intgetMonth()
Returns a number representing the month that contains or begins with the instant in time represented by this Date object.
intgetNanos()
Gets this Timestamp object's nanos value.
intgetSeconds()
Returns the number of seconds past the minute represented by this date.
longgetTime()
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Timestamp object.
intgetYear()
Returns a value that is the result of subtracting 1900 from the year that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.
inthashCode()
The hashCode method uses the underlying java.util.Date implementation and therefore does not include nanos in its computation.
voidsetMinutes(int minutes)
Sets the minutes of this Date object to the specified value.
voidsetNanos(int n)
Sets this Timestamp object's nanos field to the given value.
voidsetSeconds(int seconds)
Sets the seconds of this Date to the specified value.
voidsetTime(long time)
Sets this Timestamp object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.
InstanttoInstant()
Converts this Timestamp object to an Instant .
LocalDateTimetoLocalDateTime()
Converts this Timestamp object to a LocalDateTime .
StringtoLocaleString()
Creates a string representation of this Date object in an implementation-dependent form.
StringtoString()
Formats a timestamp in JDBC timestamp escape format.
TimestampvalueOf(String s)
Converts a String object in JDBC timestamp escape format to a Timestamp value.
TimestampvalueOf(LocalDateTime dateTime)
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 .