XCode.Exceptions.XSqlException:“从字符串转换日期和/或时间时,转换失败。
从字符串转换日期和/或时间时,转换失败。[SQL:[Dbconn] SET NOCOUNT ON;Insert Into User Values('test1','$sha512$.muKnBsGwvezg18p$1DyC9gGjzI65UPNMOfL8M8rP4/KKDcaA1WJbFh2v2XbndA/HTvkGPV7SIZi4IFEVDMz9LwnIROypfSk8Oj7c9A==',0,0,0,0,1,0,{ts'2024-06-02 13:35:16.6697667'},'::1',0,0,0,0,{ts'2024-06-02 13:35:37.3732999'});Select SCOPE_IDENTITY()]”
SQL版本:SQL 2019
XCode.Exceptions.XSqlException:“从字符串转换日期和/或时间时,转换失败。 从字符串转换日期和/或时间时,转换失败。[SQL:[Dbconn] SET NOCOUNT ON;Insert Into User Values('test1','$sha512$.muKnBsGwvezg18p$1DyC9gGjzI65UPNMOfL8M8rP4/KKDcaA1WJbFh2v2XbndA/HTvkGPV7SIZi4IFEVDMz9LwnIROypfSk8Oj7c9A==',0,0,0,0,1,0,{ts'2024-06-02 13:35:16.6697667'},'::1',0,0,0,0,{ts'2024-06-02 13:35:37.3732999'});Select SCOPE_IDENTITY()]”
经在数据库手动插入数据验证:datetime只能精确到毫秒,datetime2可以精确到微秒