Uses of Class
java.sql.Timestamp

Packages that useTimestamp
Package
Description
java.sql
Provides the API for accessing and processing data stored in a data source (usually a relational database) using the Java programming language.
javax.sql
Provides the API for server side data source access and processing from the Java programming language.
javax.sql.rowset
Standard interfaces and base classes for JDBCRowSet implementations.
javax.sql.rowset.serial
Provides utility classes to allow serializable mappings between SQL types and data types in the Java programming language.
  • Uses ofTimestamp injava.sql

    Methods injava.sql that returnTimestamp
    Modifier and Type
    Method
    Description
    staticTimestamp
    Timestamp.from(Instant instant)
    Obtains an instance ofTimestamp from anInstant object.
    CallableStatement.getTimestamp(int parameterIndex)
    Retrieves the value of the designated JDBCTIMESTAMP parameter as ajava.sql.Timestamp object.
    CallableStatement.getTimestamp(int parameterIndex,Calendar cal)
    Retrieves the value of the designated JDBCTIMESTAMP parameter as ajava.sql.Timestamp object, using the givenCalendar object to construct theTimestamp object.
    CallableStatement.getTimestamp(String parameterName)
    Retrieves the value of a JDBCTIMESTAMP parameter as ajava.sql.Timestamp object.
    CallableStatement.getTimestamp(String parameterName,Calendar cal)
    Retrieves the value of a JDBCTIMESTAMP parameter as ajava.sql.Timestamp object, using the givenCalendar object to construct theTimestamp object.
    ResultSet.getTimestamp(int columnIndex)
    Retrieves the value of the designated column in the current row of thisResultSet object as ajava.sql.Timestamp object in the Java programming language.
    ResultSet.getTimestamp(int columnIndex,Calendar cal)
    Retrieves the value of the designated column in the current row of thisResultSet object as ajava.sql.Timestamp object in the Java programming language.
    ResultSet.getTimestamp(String columnLabel)
    Retrieves the value of the designated column in the current row of thisResultSet object as ajava.sql.Timestamp object in the Java programming language.
    ResultSet.getTimestamp(String columnLabel,Calendar cal)
    Retrieves the value of the designated column in the current row of thisResultSet object as ajava.sql.Timestamp object in the Java programming language.
    SQLInput.readTimestamp()
    Reads the next attribute in the stream and returns it as ajava.sql.Timestamp object.
    staticTimestamp
    Timestamp.valueOf(String s)
    Converts aString object in JDBC timestamp escape format to aTimestamp value.
    staticTimestamp
    Timestamp.valueOf(LocalDateTime dateTime)
    Obtains an instance ofTimestamp from aLocalDateTime object, with the same year, month, day of month, hours, minutes, seconds and nanos date-time value as the providedLocalDateTime.
    Methods injava.sql with parameters of typeTimestamp
    Modifier and Type
    Method
    Description
    boolean
    Timestamp.after(Timestamp ts)
    Indicates whether thisTimestamp object is later than the givenTimestamp object.
    boolean
    Timestamp.before(Timestamp ts)
    Indicates whether thisTimestamp object is earlier than the givenTimestamp object.
    int
    Timestamp.compareTo(Timestamp ts)
    Compares thisTimestamp object to the givenTimestamp object.
    boolean
    Timestamp.equals(Timestamp ts)
    Tests to see if thisTimestamp object is equal to the givenTimestamp object.
    void
    CallableStatement.setTimestamp(String parameterName,Timestamp x)
    Sets the designated parameter to the givenjava.sql.Timestamp value.
    void
    CallableStatement.setTimestamp(String parameterName,Timestamp x,Calendar cal)
    Sets the designated parameter to the givenjava.sql.Timestamp value, using the givenCalendar object.
    void
    PreparedStatement.setTimestamp(int parameterIndex,Timestamp x)
    Sets the designated parameter to the givenjava.sql.Timestamp value.
    void
    PreparedStatement.setTimestamp(int parameterIndex,Timestamp x,Calendar cal)
    Sets the designated parameter to the givenjava.sql.Timestamp value, using the givenCalendar object.
    void
    ResultSet.updateTimestamp(int columnIndex,Timestamp x)
    Updates the designated column with ajava.sql.Timestamp value.
    void
    ResultSet.updateTimestamp(String columnLabel,Timestamp x)
    Updates the designated column with ajava.sql.Timestamp value.
    void
    Writes the next attribute to the stream as a java.sql.Timestamp object.
  • Uses ofTimestamp injavax.sql

    Methods injavax.sql with parameters of typeTimestamp
    Modifier and Type
    Method
    Description
    void
    RowSet.setTimestamp(int parameterIndex,Timestamp x)
    Sets the designated parameter in thisRowSet object's command to the givenjava.sql.Timestamp value.
    void
    RowSet.setTimestamp(int parameterIndex,Timestamp x,Calendar cal)
    Sets the designated parameter in thisRowSet object's command with the givenjava.sql.Timestamp value.
    void
    RowSet.setTimestamp(String parameterName,Timestamp x)
    Sets the designated parameter to the givenjava.sql.Timestamp value.
    void
    RowSet.setTimestamp(String parameterName,Timestamp x,Calendar cal)
    Sets the designated parameter to the givenjava.sql.Timestamp value, using the givenCalendar object.
  • Uses ofTimestamp injavax.sql.rowset

    Methods injavax.sql.rowset with parameters of typeTimestamp
    Modifier and Type
    Method
    Description
    void
    BaseRowSet.setTimestamp(int parameterIndex,Timestamp x)
    Sets the designated parameter to the givenjava.sql.Timestamp value.
    void
    BaseRowSet.setTimestamp(int parameterIndex,Timestamp x,Calendar cal)
    Sets the designated parameter to the givenjava.sql.Timestamp object.
    void
    BaseRowSet.setTimestamp(String parameterName,Timestamp x)
    Sets the designated parameter to the givenjava.sql.Timestamp value.
    void
    BaseRowSet.setTimestamp(String parameterName,Timestamp x,Calendar cal)
    Sets the designated parameter to the givenjava.sql.Timestamp value, using the givenCalendar object.
  • Uses ofTimestamp injavax.sql.rowset.serial

    Methods injavax.sql.rowset.serial that returnTimestamp
    Modifier and Type
    Method
    Description
    SQLInputImpl.readTimestamp()
    Retrieves the next attribute in thisSQLInputImpl object as ajava.sql.Timestamp object.
    Methods injavax.sql.rowset.serial with parameters of typeTimestamp
    Modifier and Type
    Method
    Description
    void
    SQLOutputImpl.writeTimestamp(Timestamp x)
    Writes ajava.sql.Timestamp object in the Java programming language to thisSQLOutputImpl object.