Is this working as designed? I was kind of expecting “5/05/2022 11:58” to be returned, because that’s what you can see in the A1 cell in Excel. Whereas “5/05/2022 11:58:59 AM” is what you can see in Excel in the formula entry bar, when cell A1 is selected.
The format string I can see that Excel has automatically derived for this cells content is:
“d/mm/yyyy h:mm” (my PC is configured with Australian regional settings, where day is typically displayed before the month).
I realise I can use ExcelCell.DateTimeValue, and format the date as required, but was more curious than anything.
When I write that value into a cell, I get this formatting:
And I get the correct result when using ExcelCell.GetFormattedValue.
I also tried using the “d/mm/yyyy h:mm” number format, but the issue doesn’t occur with it as well.
Just in case, what version of GemBox.Spreadsheet are you using?
I am using hotfix: 49.0.1174 (file version 40.0.35.1174).Running in .NET Framework 4.7.2.
Pretty sure I recall seeing this behavior with earlier versions as well.
My PCs regional settings in Windows 10 looks like this: