這是MySql數(shù)據(jù)庫中使用的格式:2018-04-22。在我的C#表單中,選擇值形式dataTimePicker:String data1 = dataTimePicker1.Text;然后使用參數(shù)發(fā)送:cmd.Parameters.Add("@data1", MySqlDbType.Date).Value = data1;我將dataTimePicker1自定義格式更改為:yyyy-MM-dd但似乎它仍然發(fā)送了錯(cuò)誤的格式:An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
- 1 回答
- 0 關(guān)注
- 258 瀏覽
添加回答
舉報(bào)
0/150
提交
取消