Skip to main content
Solved

HI all, How do I convert a date time attribute of this example "44821.76657" to DD-MM-YYY HH-MM-SS? using the Attribute manager. Loading the same data in Excel I simply specify it as Date and it gives 17-09-2022 18:23:52.


eadetutu
Participant

I was told the data  "44821.76657" is the elapsed days and time since "1 Jan 1900"

Best answer by geomancer

This one had me stumped for a while, as my results kept being one day off. But it turns out all Excel versions have a deliberate bug: 1900 is considered to be a leap year(!). Apparently this was done for better compatibility with the once famous Lotus 1-2-3.

Of course all Excel functions niftily work around this real Year 1900 Bug! For more information see here.

Also bear in mind that 1-1-1900 is day 1 (not 0).

Excel_Day_NumberPlease note: This solution gives a wrong date for all 59 days in januari and februari 1900. I hope this is not a problem ;-)

View original
Did this help you find an answer to your question?

3 replies

david_r
Evangelist
  • November 8, 2022

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • Best Answer
  • November 8, 2022

This one had me stumped for a while, as my results kept being one day off. But it turns out all Excel versions have a deliberate bug: 1900 is considered to be a leap year(!). Apparently this was done for better compatibility with the once famous Lotus 1-2-3.

Of course all Excel functions niftily work around this real Year 1900 Bug! For more information see here.

Also bear in mind that 1-1-1900 is day 1 (not 0).

Excel_Day_NumberPlease note: This solution gives a wrong date for all 59 days in januari and februari 1900. I hope this is not a problem ;-)


eadetutu
Participant
  • Author
  • Participant
  • November 14, 2022

HI all, thanks for the feed back, I was able to get it solved using a combination of both of your response.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings