共用方式為


PSDataTable.GetColumnAsDateTime 方法 (DataRow, String, DateTime)

會取得指定資料行DataRow物件中的DateTime值則為預設值。

命名空間:  Microsoft.Office.Project.Server.Library
組件:  Microsoft.Office.Project.Server.Library (在 Microsoft.Office.Project.Server.Library.dll 中)

語法

'宣告
Public Shared Function GetColumnAsDateTime ( _
    row As DataRow, _
    colName As String, _
    defaultValue As DateTime _
) As DateTime
'用途
Dim row As DataRow
Dim colName As String
Dim defaultValue As DateTime
Dim returnValue As DateTime

returnValue = PSDataTable.GetColumnAsDateTime(row, _
    colName, defaultValue)
public static DateTime GetColumnAsDateTime(
    DataRow row,
    string colName,
    DateTime defaultValue
)

參數

  • defaultValue
    類型:System.DateTime

    若要傳回,如果row或colNamenull 參考 (未執行任何動作 於 Visual Basic 中)預設值。

傳回值

類型:System.DateTime
會傳回指定資料行DateTime值。如果row或colNamenull 參考 (未執行任何動作 於 Visual Basic 中),它會傳回new DateTime(0)。

請參閱

參照

PSDataTable 類別

PSDataTable 成員

GetColumnAsDateTime 多載

Microsoft.Office.Project.Server.Library 命名空間