Help with unix time with sqlite source

I have a timestamp in my data base with values like this:
1639267200000 (current date, today)

If I do a simple query like:

select date from data

it is shown like a string as:

2021-12-11 00:00:00 +0000 UTC

With the date conversor
it does not work (no result), so I use the suggested conversor to convert a “date” column to a parsable timestamp

WITH converted AS (
SELECT date || ‘’ AS datetime FROM data
SELECT datetime FROM converted ORDER BY datetime ASC

and then I get the current timestamp just like I see in the database:

If I transfor this number to current date in, it is ok, but the timee formatted columns conversor does not work.

Other solution I read was to try with this query

REPLACE(date, ’ ',‘T’) || ‘’ AS time
FROM data

The result is the same unix timestamp value (1639180800000) and then the conversor works, but the date is totally wrong:


No idea why or what else to do.

1639267200000 is a timestamp in milliseconds. Normal Unix timestamps (and what the plugin expects) is in seconds.
You should do something like: SELECT date/1000 as the_date from data