如何使用Java在SQL Server中存储带有精确小数的DateTime

huangapple 未分类评论47阅读模式
英文:

How to store DateTime with exact decimals in SQL Server using Java

问题

我正在尝试从Informix获取Datetime,并通过Java将其存储在SQL Server中,使用Java中的java.util.Date数据类型和SQL Server中的datetime2数据类型,但我发现SQL数据和Informix数据之间存在小数差异,这给我造成了比较问题。

有人能建议我如何解决这个小数不匹配问题吗?

英文:

I am trying to get Datetime from Informix and stored it in SQL Server through Java by using java.util.Date datatype in Java and datetime2 datatype in SQL Server but I am getting decimals difference between SQL data and Informix data and this creates a comparison problem for me.

Can anyone suggest me to fix this decimal mismatch?

huangapple
  • 本文由 发表于 2020年5月29日 16:27:29
  • 转载请务必保留本文链接:https://java.coder-hub.com/62081736.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定