PSDataTable.GetColumnAsDateTime method (DataRow, String)
Gets the DateTime value of the specified column in a DataRow object.
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 _
) As DateTime
'Usage
Dim row As DataRow
Dim colName As String
Dim returnValue As DateTime
returnValue = PSDataTable.GetColumnAsDateTime(row, _
colName)
public static DateTime GetColumnAsDateTime(
DataRow row,
string colName
)
Parameters
row
Type: System.Data.DataRowThe row to search for the specified column.
colName
Type: System.StringThe name of the column.
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).
Remarks
Internally, GetColumnAsDateTime(row, colName) calls GetColumnAsBoolean(row, colName, new DateTime(0)).