Hitachi

Hitachi Advanced Database Application Development Guide


8.5.56 getTimestamp(int columnIndex, Calendar cal)

Organization of this subsection

(1) Function

This method acquires in a java.sql.Timestamp object the value in a specified column in the current row of the ResultSet object. The column whose value is to be acquired is specified in the argument.

This method uses a specified calendar to create the appropriate time stamp as a millisecond value.

(2) Format

public synchronized java.sql.Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException

(3) Arguments

int columnIndex

Specifies a column number.

Calendar cal

Specifies the calendar in which the time zone for the values stored in the database has been set.

(4) Return value

This method returns the column value. For details about the relationship between the retrieval result and the return value, see Table 8‒36: Relationship between the retrieval result and the return value (getTimestamp method).

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: