I’m developing a tool that queries external system for updates and this query is based on the update time value that is represented as an Excel internal date representation respectively to the seconds at least.
For example:
18-September-2012 00:00:01.000 41170.0000115741
18-September-2012 01:00:00.000 41170.0416666667
I need to convert java date (currently I’m using JodaTime but this is not a big difference) to this inrternal Excel date representation.
I spent much time trying to understand Excel internal date representation with many of resources I googled. It works with days perfectly but when I’m trying to calculate a fractial respectively to seconds it becomes difficult to understand.
Excel Time is simply fractions of a day. So 1 hr =
1/24, 1 sec =1/86400etc. Any imprecission is due to the limitations of floating point maths.