简体   繁体   中英

DB2 Timestamp Query shows differetn value in excel

I am using c#, with DB2, a query

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.

The timestamp value is the same*, it's just how it's being displayed in Excel. You can change the formatting in Excel to display the value as it shows in DB2 if you'd like.

Note: A DB2 timestamp is accurate to microseconds, but Excel only supports milliseconds. So you will lose a little precision.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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