Stop Excel from converting Date to Number
46,561
Solution 1
Just place an apostrophe at the beginning:
'Aug-15
The apostrophe will not display in the cell. It forces Excel to treat what follows at text.
Solution 2
Right click on the cell and go to format cells. There you can define the cell format.
Author by
Bee
Updated on September 18, 2020Comments
-
Bee over 3 years
I have an Excel spreadsheet A.xls with 5 columns. One of the headers is Aug-15. When I change the
Aug
toSep
Excel re-formats to:15-Sep
.When I click on General it shows a value of
42262
thus when I extract the cell-value using Python, it returns42262
.How can I retain the formatting as Sep-15 so it returns
Sep-15
?
Where is it actually doing this conversion in Excel?