-- display time as h:MM:SS or mm:SS
-- sqlite uses || instead of + or CONCAT() and FORMAT() is the same as PRINTF()
SELECT ROWID, SUBSTRING(DateCreated, 1,16) AS DATE, ItemType, ItemName,
IIF(PlayDuration > 3599,
(PlayDuration/3600) || ':' || FORMAT('%02d', (PlayDuration % 3600 / 60)) || ':' || FORMAT('%02d', (PlayDuration % 3600 % 60)),
(PlayDuration / 60) || ':' || FORMAT('%02d', (PlayDuration % 60))) AS TIME
FROM PlaybackActivity
WHERE UserId = 'edd3338a60a240549f0fb296c8bab625'
ORDER BY rowid DESC
Comments
0 B
|👍
/👎
0 B
|👍
/👎