Page 1 of 1

MM.DB Question

Posted: Tue Oct 31, 2017 9:27 pm
by jcfogerty
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).

Re: MM.DB Question

Posted: Thu Nov 02, 2017 6:54 am
by PetrCBR
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;

Re: MM.DB Question

Posted: Thu Nov 02, 2017 1:28 pm
by jcfogerty
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.