简体   繁体   中英

Datetime accuracy when getting data from DB2 using Entity Framework

I have an IBM DB2 database, and I need to get values from one column that is primary key and it is TIMESTAMP. That primary key is in this format: dd.MM.yyyy hh:mm:ss.ffffff

I need to get it with full accuracy. But, when I use Entity framework for getting the data last 3 numbers of are lost.

I get this format: dd.MM.yyyy hh:mm:ss.fff. Is there an easy way to solve this problem and get precise data, like telling Entity framework in some way that I am expecting datatime in this specific format?

Get the value as both a DateTime and text, parse the microseconds and add them to the DateTime using code from here:

Is there a high resolution (microsecond, nanosecond) DateTime object available for the CLR?

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