Export (0) Print
Expand All

DataType.DateTimeOffset Method

Returns values for year, month, day, valid time of day between 00:00:00 and 23:59:59:9999999 and offset, in hours, from UTC. It has a length of at least 25 positions.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public static DataType DateTimeOffset(
	int scale


Type: Int32
An Int32 representing the scale value.

Return Value

Type: Microsoft.SqlServer.Management.Smo.DataType
A DataType object value that specifies a DateTimeOffset definition in the data type.

The DateTimeOffset object constructor is initialized with the scale value that determines the precision of the DateTimeOffset object.

Visual Basic

Dim dt As DataType
dt = New DataType(SqlDataType.DateTimeOffset, 25)


$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::DateTimeOffset, 25)
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft