0

When I import the excel contents to datatable, I read the cell values using

cell.CellValue

For, date value I'm not getting it properly, some random numbers are getting retrieved in CellValue. Same is the case with Time.

Any help appreciated.

renuka
  • 549
  • 2
  • 5
  • 11

1 Answers1

3

Try like below. It will help you....

Convert that value to Double and to date.

double dtvalue = double.Parse(cell.CellValue);
DateTime dateInfo= DateTime.FromOADate(dtvalue );
Pandian
  • 8,848
  • 2
  • 23
  • 33