DateTime Question?


We use Cells.ExportDataTable() to export data,
one of these columns is user-defined type --> yyyy/M/d hh:mm:ss.
Then the data of cell we get is wrong.
Original data is 2005/12/21 12:00:00
We read it show as 2005/12/21 :00:00.

And if the cell type is normal DateTime, we can't read seconds.
Original value is 2005/12/12 12:03:22
but we read it as 2005/12/12 12:03

please help us, thanks


I will check the first issue.

For second issue, please check the format string of cell B12 in "Master" worksheet. It's "yyyy-m-d h:mm" which doesn't show the seconds.


I also didn't find the first problem. In Cell B11 of "Master" worksheet, the data is also 2005/12/21 00:00:00.

Could you please post your sample code here and describe your need with more detail information? Thank you.


Thanks for your test, We want to get block data from excel, so we use Cells.ExportDataTable().
Our customers may use user-defined type to save data,
like yyyy/m/d hh:mm:ss.
If our application to read that cell, it always get wrong data.
Give you our test code and result ,and thanks again.


this is result.jpg

by the way , Merry Chrismas !!


Merry Christmas and Happy New Year!

Please try this attached fix.


This is my screenshot for your file and output result.


It’s ok,thanks so much !!