C# How to send currect date format from dateTimePicker to MySQL : This is the format used in my MySql database: 2018-04-22.

In my C# form, I pick the value form dataTimePicker:


    String data1 = dataTimePicker1.Text;
Then send it with parameter:

    cmd.Parameters.Add("@data1", MySqlDbType.Date).Value = data1;

I changed dataTimePicker1 custom format to: `yyyy-MM-dd` but it seems it still sends the wrong format: `An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll`

