public static DateTime GetDBDateTime(String sqlFieldName, MySql.Data.MySqlClient.MySqlDataReader reader) { try { return reader[sqlFieldName].Equals(DBNull.Value) ? DateTime.MaxValue : reader.GetDateTime(sqlFieldName); } catch { return DateTime.MaxValue; } }