共用方式為


Date 屬性

The Date property returns a Date data type.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Shared ReadOnly Property Date As DataType
    Get
'用途
Dim value As DataType

value = DataType.Date
public static DataType Date { get; }
public:
static property DataType^ Date {
    DataType^ get ();
}
static member Date : DataType
static function get Date () : DataType

屬性值

型別:Microsoft.SqlServer.Management.Smo. . :: . .DataType
A DataType object value that specifies a Date definition in the data type.

備註

Returns date information that represents any valid Gregorian calendar date between 0001-01-01 and 9999-12-31.

範例

Visual Basic

Dim dt As DataType
dt = New DataType(SqlDataType.Date)

PowerShell

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