| Package | Description | 
|---|---|
| java.sql | Provides the API for accessing and processing data stored in a 
data source (usually a relational database) using the 
JavaTM programming language. | 
| javax.sql | Provides the API for server side data source access and processing from
the JavaTM programming language. | 
| javax.sql.rowset | Standard interfaces and base classes for JDBC  RowSetimplementations. | 
| javax.sql.rowset.serial | Provides utility classes to allow serializable mappings between SQL types
and data types in the Java programming language. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Timestamp | Timestamp. from(Instant instant)Obtains an instance of  Timestampfrom anInstantobject. | 
| Timestamp | CallableStatement. getTimestamp(int parameterIndex)Retrieves the value of the designated JDBC  TIMESTAMPparameter as ajava.sql.Timestampobject. | 
| Timestamp | ResultSet. getTimestamp(int columnIndex)Retrieves the value of the designated column in the current row
 of this  ResultSetobject as
 ajava.sql.Timestampobject in the Java programming language. | 
| Timestamp | CallableStatement. getTimestamp(int parameterIndex,
            Calendar cal)Retrieves the value of the designated JDBC  TIMESTAMPparameter as ajava.sql.Timestampobject, using
 the givenCalendarobject to construct
 theTimestampobject. | 
| Timestamp | ResultSet. getTimestamp(int columnIndex,
            Calendar cal)Retrieves the value of the designated column in the current row
 of this  ResultSetobject as ajava.sql.Timestampobject
 in the Java programming language. | 
| Timestamp | CallableStatement. getTimestamp(String parameterName)Retrieves the value of a JDBC  TIMESTAMPparameter as ajava.sql.Timestampobject. | 
| Timestamp | ResultSet. getTimestamp(String columnLabel)Retrieves the value of the designated column in the current row
 of this  ResultSetobject as
 ajava.sql.Timestampobject in the Java programming language. | 
| Timestamp | CallableStatement. getTimestamp(String parameterName,
            Calendar cal)Retrieves the value of a JDBC  TIMESTAMPparameter as ajava.sql.Timestampobject, using
 the givenCalendarobject to construct
 theTimestampobject. | 
| Timestamp | ResultSet. getTimestamp(String columnLabel,
            Calendar cal)Retrieves the value of the designated column in the current row
 of this  ResultSetobject as ajava.sql.Timestampobject
 in the Java programming language. | 
| Timestamp | SQLInput. readTimestamp()Reads the next attribute in the stream and returns it as a  java.sql.Timestampobject. | 
| static Timestamp | Timestamp. valueOf(LocalDateTime dateTime)Obtains an instance of  Timestampfrom aLocalDateTimeobject, with the same year, month, day of month, hours, minutes,
 seconds and nanos date-time value as the providedLocalDateTime. | 
| static Timestamp | Timestamp. valueOf(String s)Converts a  Stringobject in JDBC timestamp escape format to aTimestampvalue. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | Timestamp. after(Timestamp ts)Indicates whether this  Timestampobject is
 later than the givenTimestampobject. | 
| boolean | Timestamp. before(Timestamp ts)Indicates whether this  Timestampobject is
 earlier than the givenTimestampobject. | 
| int | Timestamp. compareTo(Timestamp ts)Compares this  Timestampobject to the givenTimestampobject. | 
| boolean | Timestamp. equals(Timestamp ts)Tests to see if this  Timestampobject is
 equal to the givenTimestampobject. | 
| void | PreparedStatement. setTimestamp(int parameterIndex,
            Timestamp x)Sets the designated parameter to the given  java.sql.Timestampvalue. | 
| void | PreparedStatement. setTimestamp(int parameterIndex,
            Timestamp x,
            Calendar cal)Sets the designated parameter to the given  java.sql.Timestampvalue,
 using the givenCalendarobject. | 
| void | CallableStatement. setTimestamp(String parameterName,
            Timestamp x)Sets the designated parameter to the given  java.sql.Timestampvalue. | 
| void | CallableStatement. setTimestamp(String parameterName,
            Timestamp x,
            Calendar cal)Sets the designated parameter to the given  java.sql.Timestampvalue,
 using the givenCalendarobject. | 
| void | ResultSet. updateTimestamp(int columnIndex,
               Timestamp x)Updates the designated column with a  java.sql.Timestampvalue. | 
| void | ResultSet. updateTimestamp(String columnLabel,
               Timestamp x)Updates the designated column with a  java.sql.Timestampvalue. | 
| void | SQLOutput. writeTimestamp(Timestamp x)Writes the next attribute to the stream as a java.sql.Timestamp object. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | RowSet. setTimestamp(int parameterIndex,
            Timestamp x)Sets the designated parameter in this  RowSetobject's command
 to the givenjava.sql.Timestampvalue. | 
| void | RowSet. setTimestamp(int parameterIndex,
            Timestamp x,
            Calendar cal)Sets the designated parameter in this  RowSetobject's command
 with the givenjava.sql.Timestampvalue. | 
| void | RowSet. setTimestamp(String parameterName,
            Timestamp x)Sets the designated parameter to the given  java.sql.Timestampvalue. | 
| void | RowSet. setTimestamp(String parameterName,
            Timestamp x,
            Calendar cal)Sets the designated parameter to the given  java.sql.Timestampvalue,
 using the givenCalendarobject. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | BaseRowSet. setTimestamp(int parameterIndex,
            Timestamp x)Sets the designated parameter to the given
  java.sql.Timestampvalue. | 
| void | BaseRowSet. setTimestamp(int parameterIndex,
            Timestamp x,
            Calendar cal)Sets the designated parameter to the given
  java.sql.Timestampobject. | 
| void | BaseRowSet. setTimestamp(String parameterName,
            Timestamp x)Sets the designated parameter to the given  java.sql.Timestampvalue. | 
| void | BaseRowSet. setTimestamp(String parameterName,
            Timestamp x,
            Calendar cal)Sets the designated parameter to the given  java.sql.Timestampvalue,
 using the givenCalendarobject. | 
| Modifier and Type | Method and Description | 
|---|---|
| Timestamp | SQLInputImpl. readTimestamp()Retrieves the next attribute in this  SQLInputImplobject as
 ajava.sql.Timestampobject. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | SQLOutputImpl. writeTimestamp(Timestamp x)Writes a  java.sql.Timestampobject in the Java programming
 language to thisSQLOutputImplobject. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.