Convert Integer to Date in Excel issue

Copper Contributor

Hi,

 

Currently I have issue regarding converting integer to date in Excel.

If I put 60 in one of the cell, then I convert it to Date it become 29-Feb-1900 which is not correct.

If I put 61, 62, etc..the conversion result are also not correct.

 

I am not sure if this question have been asked before, but are there anybody encounter the same issue ? Could you share with me how to overcome this issue?

 

Thanks and Regards,

Tj

4 Replies

Hi,

 

The cells in which you entered numbers are formatted as dates!

Just select these cell, go to Home >> Number and then select General Format or Number format.

Or do select these cell and then press (Ctrl+Shift+~) to apply the General Format.

Hi,

 

Thanks for replying.

Actually what my question was about the result of the conversion. It is not correct, since for example for integer 60, if we convert it to date the way you told me, the result would be 29 Feb 1900 which is not correct. Because 1900 is not a Leap Year, hence it doesn't have 29 Feb.

Another example is, if we have an integer 61 the result is 01-Mar-1900 which is not correct either, it supposed to be 61 => 02-Mar-1900 and 60 => 01-Mar-1900.

So, if we convert an integer bigger than 59 the result would be not correct.

 

You can check too if you want.

 

Regards,

Tj

Tjarliman,

 

it's not a bug, it's a feature ... sort of.

 

Excel incorrectly assumes that the year 1900 is a leap year

Don't care much about this.

No matter if the sequential serial number of each date is increased by one, this is just a representative number used to give the ability to perform mathematical operations on dates.

 

If you're upset about this, you can use the 1904 date system!

But I don't recommend it!