DataReaderExtensions.ToDateTime method

namespace: Serenity.Data   assemblySerenity.Net.Data

Reads and converts value at field index to DateTime. Returns DbNull as Null.DateTime.

public static DateTime? ToDateTime(this IDataReader reader, int index)
parameter description
reader Reader (required).
index Index.

Return Value

Field value or Null.DateTime if value is DbNull.

See Also