MySqlDataReaderGetDateTime Method (String) |
Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.9.9

public DateTime GetDateTime( string column )
Public Function GetDateTime ( column As String ) As DateTime
public: DateTime GetDateTime( String^ column )
member GetDateTime : column : string -> DateTime
Parameters
- column
- Type: SystemString
The column name.
Return Value
Type: DateTimeThe value of the specified column.

No conversions are performed; therefore, the data retrieved must already be a DateTime object.
Call IsDBNull to check for null values before calling this method.
![]() |
---|
MySql allows date columns to contain the value '0000-00-00' and datetime columns to contain the value '0000-00-00 00:00:00'. The DateTime structure cannot contain or represent these values. To read a datetime value from a column that might contain zero values, use GetMySqlDateTime(Int32). The behavior of reading a zero datetime column using this method is defined by the ZeroDateTimeBehavior connection string option. For more information on this option, please refer to ConnectionString. |
