@ourcore, there are lots of examples above! What have you tried? What platform are you using?
Note to others - Plex 1.26.x has changed the datatype of datetime columns. Plex is now storing a unix-style seconds-since-1970-epoch time.
Here’s a web toy for converting this format: https://www.epochconverter.com/
The sqlite strftime()
function can be used in UPDATE statements to convert to epoch seconds on the fly; modify the YYYY-MM-DD and ABC as you would have before.
UPDATE metadata_items SET added_at=strftime('%s','YYYY-MM-DD') where id = ABC;
And the sqlite datetime()
function can be used to convert epoch seconds to normal dates for display:
SELECT id,title,datetime(added_at,'unixepoch') FROM metadata_items WHERE id = ABC;