共用方式為


SPUtility.CreateDateTimeFromSqlString method

會指定的 SQL 字串 (以 yyyymmdd: mm: ss 格式) 轉換成DateTime格式。

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function CreateDateTimeFromSqlString ( _
    sqlTime As String _
) As DateTime
'用途
Dim sqlTime As String
Dim returnValue As DateTime

returnValue = SPUtility.CreateDateTimeFromSqlString(sqlTime)
public static DateTime CreateDateTimeFromSqlString(
    string sqlTime
)

參數

  • sqlTime
    Type: System.String

    包含日期及時間格式為 SQL 字串。

傳回值

Type: System.DateTime
System.DateTime物件提供的日期和時間。

請參閱

參照

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace