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.

  • November 8, 2022
  • 3 replies
  • 24 views

eadetutu
Contributor
Forum|alt.badge.img

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 ;-)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 8391 replies
  • November 8, 2022

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • 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
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 2 replies
  • 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.