GetRows()
method parses 12:20 PM
as 00:20 AM
, not consistent to ExcelDateToTime()
method
#1338
Labels
confirmed
This issue can be reproduced
Description
The
excelize.File.GetRows
method parses12:20 PM
as00:20 AM
, usually 12:20 PM is treated as 20 minutes past noon, which is 12:20 in 24-hour format.Steps to reproduce the issue:
1/2/23 12:20 PM
in a cell, the cell is in Date format.excelize.File.GetRows(sheetName)
method to get the rows.Describe the results you received:
1/2/23 00:20 AM
Describe the results you expected:
1/2/23 12:20 PM
Workaround
There is a workaround.
excelize.File.GetRows(sheetName, excelize.Options{RawCellValue: true})
excelize.ExcelDateToTime(f, false)
method.Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
macOS Monterey 12.5.1
The text was updated successfully, but these errors were encountered: