Convert start_ts in statistics table to yyyy-mm

I have a python script that uses data from the statistics table to generate a monthly invoice for energy used by my car.

Before the “start” column contained the date and time in human readable format.
My script filtered out the datapoints using yyyy-mm.

Now that column is empty and there’s a new start_ts column.
How do I convert that float into a date?

I tried CAST(start_ts AS DATE) in the sqlite query but that doesn’t work.

What is the format of that start_ts column and how do I convert it to yyyy-mm?

FROM_UNIXTIME(start_ts)

That function doesn’t exist in sqlite, but it got me on the right track.
The equivalent in sqlite is date(start_ts,‘unixepoch’).
This works:

I indeed dit not check… using mariadb for soo long, forgot sqlite :slight_smile:

Still thinking about switching as well… But I’m afraid to lose data or break things.

Hi, is it possible to use this column in Grafana as a time column? Somehow I can’t figure out how to get one of that charts working.

Thanks