PSDataTable.GetColumnAsDateTime Method (DataRow, String, DateTime)

Gets the DateTime value of the specified column in a DataRow object, or a default value.

Namespace:  Microsoft.Office.Project.Server.Library
Assembly:  Microsoft.Office.Project.Server.Library (in Microsoft.Office.Project.Server.Library.dll)

Syntax

'Declaration
Public Shared Function GetColumnAsDateTime ( _
    row As DataRow, _
    colName As String, _
    defaultValue As DateTime _
) As DateTime
'Usage
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
)

Parameters

  • defaultValue
    Type: System.DateTime
    The default value to return, if either row or colName are a null reference (Nothing in Visual Basic).

Return Value

Type: System.DateTime
Returns the DateTime value of the specified column. If either row or colName are a null reference (Nothing in Visual Basic), it returns new DateTime(0).

See Also

Reference

PSDataTable Class

PSDataTable Members

GetColumnAsDateTime Overload

Microsoft.Office.Project.Server.Library Namespace