Gets the value of the specified column as a DateTime.

Namespace: System.Extensions.Data
Assembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)

Syntax

C#
public static DateTime GetDateTime(
	this IDataRecord reader,
	string name
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function GetDateTime ( 
	reader As IDataRecord,
	name As String
) As DateTime
Visual C++
public:
[ExtensionAttribute]
static DateTime GetDateTime(
	IDataRecord^ reader, 
	String^ name
)
F#
static member GetDateTime : 
        reader : IDataRecord * 
        name : string -> DateTime 

Parameters

reader
Type: System.Data..::..IDataRecord
The reader to retrieve the value from.
name
Type: System..::..String
The name of the field to find.

Return Value

Type: DateTime
The value of the column.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDataRecord. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also