Page 1 of 1

Database DateTime format - SQL Query

Posted: Wed Mar 18, 2026 7:09 am
by MHarran
Dates and Time are stored as a decimal in the database; how do I convert them to a string in a SQL query?

I want to create a query for LastTimePlayed that can be filtered by artist or song title.

Re: Database DateTime format - SQL Query

Posted: Fri Mar 27, 2026 9:58 am
by IanRTaylorUK
Media Monkey uses the Julian Date / Offset and can be used to sort or select.

Use the SQL Editor add-on initially to create a query.

You might want to start with something like:
SELECT Songs.Artist, Songs.SongTitle, Played.PlayDate
FROM Played
JOIN Songs on Played.IDSong = Songs.ID
WHERE Songs.Artist LIKE '%Pink Floyd%'
ORDER BY Played.PlayDate DESC;

Take your chosen query and then run it in the Custom Nodes add-on as a "Tracks" type. By using Custom Nodes, you overcome the limitation of the "number of records" shown by SQL Editor BUT your SELECT will need to be generic i.e. SELECT *.

Once you have a Custom Nodes query you can use things like the Column Filter / Sort.

This should help.