setTimestamp(String parameterName, Timestamp x, Calendar cal)
Syntax:
void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException
Description:
Sets the designated parameter to the given java.sql.Timestamp
value, using the given Calendar
object. The driver uses the Calendar
object to construct an SQL TIMESTAMP value, which the driver then sends to the database. With a Calendar
object, the driver can calculate the timestamp taking into account a custom timezone. If no Calendar
object is specified, the driver uses the default timezone, which is that of the virtual machine running the application.
Parameters:
parameterName
the name of the parameter
x
the parameter value
cal
the Calendar object the driver will use to construct the date
Throws:
SQLException - if a database access error occurs, parameterName is not a valid parameter name, or the prepared statement has been closed
Reference:
For more information, reference JDBC documentation for: CallableStatement.setTimestamp(String, Timestamp, Calendar)