在 Toad for MySQL 中执行 SELECT 语句时出现错误
当我尝试在 Toad 中执行简单的 SELECT 语句时,出现此错误
MySql.Data.Types.MySqlConversionException
Unable to convert MySQL date/time value to System.DateTime
可能出了什么问题?
I am getting this error while I am trying to execute a simple SELECT statement in Toad
MySql.Data.Types.MySqlConversionException
Unable to convert MySQL date/time value to System.DateTime
What could be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能意味着以下两个常见问题之一:
1) 零日期,即 MySQL 中的 0000-00-00。 MySQL允许您存储它们来标记0日期,您甚至可以使用0001-01-01,但并非所有驱动程序或下游程序都可以处理它们。添加到连接字符串
另一种选择是显式删除它们,例如
2) 日期格式。对于某些驱动程序/程序组合,日期作为字符串处理。显式转换是必要的:
That could mean one of these two common issues:
1) Zero dates, which are 0000-00-00 in MySQL. MySQL allows you to store them to mark 0 dates, you can even use 0001-01-01, but not all drivers or downstream programs can handle them. Add to the connection string
The other choice is explicitly removing them, something like
2) Date formatting. For some driver/program combination, the dates are handled as strings. Explicit conversion is necessary: