MM.DB Question

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

MM.DB Question

Postby jcfogerty » Tue Oct 31, 2017 9:27 pm

In the SQLite3 db for MM4, all the fields that contain dates do not seem to follow Unix or epoch time format. For example, using this converter link, it will not correctly convert dates shown in the MM.DB, such as:

40020.7278236459

The unix/epoch time format is 10 digits. I canot figure out how to convert this to a human-readable date.

When I enter
Code: Select all
7278236459
the result is:
Code: Select all
8/21/2200, 3:20:59 PM
, and when I enter
Code: Select all
40020.7278236459
the result is
Code: Select all
1/1/1970, 5:07:00 AM


I want to access this info directly (not generate a report through the MM GUI).
jcfogerty
 
Posts: 70
Joined: Sat Feb 16, 2008 2:44 pm

Re: MM.DB Question

Postby PetrCBR » Thu Nov 02, 2017 6:54 am

We have no method to converting that, but it's simple:
Code: Select all
SQL time to UNIX:
trunc((SQLTime - 25569) * 86400);

UNIX to SQL time:
(UnixTime / 86400) + 25569;
PetrCBR
 
Posts: 1337
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech

Re: MM.DB Question

Postby jcfogerty » Thu Nov 02, 2017 1:28 pm

PetrCBR wrote:We have no method to converting that, but it's simple:
Code: Select all
SQL time to UNIX:
trunc((SQLTime - 25569) * 86400);

UNIX to SQL time:
(UnixTime / 86400) + 25569;


Perfect! thanks so much.
jcfogerty
 
Posts: 70
Joined: Sat Feb 16, 2008 2:44 pm


Return to Need Help? (mmw)

Who is online

Users browsing this forum: No registered users and 27 guests