简体   繁体   English

DB2时间戳查询在excel中显示差异值

[英]DB2 Timestamp Query shows differetn value in excel

I am using c#, with DB2, a query 我在DB2中使用c#查询

SELECT current timestamp FROM sysibm.sysdummy1 

shows correct value in Toad, but throgh code, gets value formatted in DD/MM/YY HH:MM format when I show it in excel. 在Toad中显示正确的值,但是当我在excel中显示时,throgh代码获取的格式为DD/MM/YY HH:MM格式。

The timestamp value is the same*, it's just how it's being displayed in Excel. 时间戳记值是相同的*,也就是它在Excel中的显示方式。 You can change the formatting in Excel to display the value as it shows in DB2 if you'd like. 您可以根据需要在Excel中更改格式以显示DB2中显示的值。

Note: A DB2 timestamp is accurate to microseconds, but Excel only supports milliseconds. 注意:DB2时间戳精确到毫秒,但是Excel仅支持毫秒。 So you will lose a little precision. 因此,您将失去一点精度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM