Bug #121442 DATETIME data type fields exposed as MySqlDateTime through the ADO.NET driver are not IFormattable
Submitted: 7 Oct 0:25
Reporter: Vi Uv Email Updates:
Status: Open Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[7 Oct 0:25] Vi Uv
Description:
The MySqlDateTime data type is used in MySQL ADO.NET client driver. This data type does not support IFormattable interface; therefore, it cannot be formatted in GUI controls by applying standard .NET formatting classes/methods. Either those DB data types that can be represented as DateTime or DateTimeOffset should be exposed as such, or IFormattable should be implemented by MySqlDateTime.

How to repeat:
Create table1 with a DATETIME column1. Populate with current date.
Create a .NET project and install MySQL client Nuget package.
Create a connection to the database and a command with "select column1 from table1".
Bind a DataGridView to the result.
Apply formatting to the colun. The format string will be ignored, and the data will be showing in the default format.

Suggested fix:
Either replace MySqlDateTime with DateTime and DateTimeOffset or implement IFormattable.