--- title: "setDateTimeOffset Method (SQLServerPreparedStatement) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: "sql" ms.prod_service: "drivers" ms.service: "" ms.component: "jdbc" ms.reviewer: "" ms.suite: "sql" ms.technology: - "drivers" ms.tgt_pltfrm: "" ms.topic: "article" ms.assetid: 5014dba9-1755-4769-b070-6cbeecee864e caps.latest.revision: 7 author: "MightyPen" ms.author: "genemi" manager: "jhubbard" ms.workload: "Inactive" --- # setDateTimeOffset Method (SQLServerPreparedStatement) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] This method was added in [!INCLUDE[msCoName](../../../includes/msconame_md.md)][!INCLUDE[ssNoVersion](../../../includes/ssnoversion_md.md)] JDBC Driver 3.0. Sets the value of the column specified to the [DateTimeOffset Class](../../../connect/jdbc/reference/datetimeoffset-class.md) value. ## Syntax ``` public final void setDateTimeOffset(int n, microsoft.sql.DateTimeOffset x) ``` #### Parameters *n* The zero-based ordinal of a column. *x* The [DateTimeOffset Class](../../../connect/jdbc/reference/datetimeoffset-class.md) object. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## See Also [SQLServerPreparedStatement Members](../../../connect/jdbc/reference/sqlserverpreparedstatement-members.md) [SQLServerPreparedStatement Class](../../../connect/jdbc/reference/sqlserverpreparedstatement-class.md)