DataType.DateTime2 메서드

datetime2 is an extension of the existing datetime type. It has a large date range and large default fractional precision. It has a length of at least 19 positions.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
Public Shared Function DateTime2 ( _
    scale As Integer _
) As DataType
‘사용 방법
Dim scale As Integer 
Dim returnValue As DataType 

returnValue = DataType.DateTime2(scale)
public static DataType DateTime2(
    int scale
)
public:
static DataType^ DateTime2(
    int scale
)
static member DateTime2 : 
        scale:int -> DataType
public static function DateTime2(
    scale : int
) : DataType

매개 변수

  • scale
    유형: System.Int32
    An Int32 value which represents the scale (precision) of the result.

반환 값

유형: Microsoft.SqlServer.Management.Smo.DataType
A DataType object value that specifies a DateTime2 definition in the data type.

주의

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

Visual Basic

Dim dt As DataType
dt = New DataType(SqlDataType.DateTime2, 10)

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::DateTime2, 10)

참고 항목

참조

DataType 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스