Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4970
How to get datetime data from importing excel file?
posted

Try to import an excel file into xamgrid, but can't get right data for datatime.

in excel cell, the data like: 2012-10-10.

Code to import excel file: use OpenFileDialog to open excel file, then get data in Workbook. but data for above cell is: value =41223.0 , type = object{double}. The code is something like:

TestDate = DateTime.Parse(row.Cells[3].Value.ToString())

and this code stop the app.

How to resolve this problem?