Question

OK, I'm not expecting anyone to be able to figure this out, but perhaps I am too pessimistic?

I'm reading the SQLite database generated by the awesome music player AIMPv3, but it uses something wonky for storing the dates songs were played, added, etc.

So here's the table. I can provide a lot more if it's desired. Can you crack this code?!

          English             |      Stored As
------------------------------+-----------------
Date      2011.02.24 14:21:54 | 40598.5985614005
------------------------------+------------------
Date      2011.02.24 14:22:38 | 40598.5990576852
------------------------------+------------------
Date      2011.04.28 08:56:30 | 40661.3725871875
------------------------------+------------------
Date      2011.04.28 09:02:06 | 40661.3764806134
------------------------------+------------------
Date      2012.11.09 15:55:12 | 41222.663348912
------------------------------+------------------

Any help with this problem would be very much appreciated! I also have a highly varieted collection of this data, so don't hesitate to ask for additional test data.


EDIT: Here's the PHP function I'm using to convert Excel datetimes to Epochs:

function convertFromExcelDateTimeToEpoch($excelDateTime)
{
    $d = floor($excelDateTime);
    $t = $excelDateTime - $d;
    return (abs($d) > 0) ? ( $d - 25569 ) * 86400 + $t * 86400 : $t * 86400;
}
Was it helpful?

Solution

Duration is milliseconds.

Date is (fractional) number of days since January 1st, 1900.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top