MiniExcel icon indicating copy to clipboard operation
MiniExcel copied to clipboard

Reading 01/01/1900 from Excel Date column

Open ThompsJH opened this issue 3 years ago • 0 comments

Excel Type

  • [X ] XLSX
  • [ ] XLSM
  • [ ] CSV
  • [ ] OTHER

Upload Excel File

TestDatesForMiniExcel.xlsx

MiniExcel Version

1.30.0

Description

When processing the attached file using ... List<TestDates> testDates = MiniExcel.Query<TestDates>("TestDatesForMiniExcel.xlsx", null, ExcelType.XLSX).ToList(); ... the start date is in the TestDates object is 12/31/1899 and not 01/01/1900.

I can supply a .Net Core 6 example if required.

This issue arose as a result of pulling date ranges from a database that had a validity start date of 01/01/1900. That date was appearing as 01/02/1900 in the exported Excel workbook.

ThompsJH avatar Jan 05 '23 16:01 ThompsJH