共用方式為


DataType.Time 方法

Returns values for any valid time of day between 00:00:00 and 23:59:59:9999999. It has a length of at least eight positions and contains the time in hours, minutes, seconds and fractional seconds.

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

語法

'宣告
Public Shared Function Time ( _
    scale As Integer _
) As DataType
'用途
Dim scale As Integer 
Dim returnValue As DataType 

returnValue = DataType.Time(scale)
public static DataType Time(
    int scale
)
public:
static DataType^ Time(
    int scale
)
static member Time : 
        scale:int -> DataType
public static function Time(
    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 Time definition and scale (precision) in the data type.

備註

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

範例

Visual Basic

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

PowerShell

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

請參閱

參考

DataType 類別

Microsoft.SqlServer.Management.Smo 命名空間