i'm trying to implement a bar display of some data stored in a postgres database. With a query executed in Postbird Tool i get the following output:
The query in node-red with a function node and a postgres node looks like this:
msg.payload = 'select distinct(event_date) as label, max(energytoday) as payload from smarthome.pv group by event_date';
return msg;
The returned data looks like this:
The date fields in the label column wrong!? There exists no date "2022-02-24" in the database! But why is it so? event_date is a "normal" date field in the database.
That depends on what you want to do with it. The date/time it is giving you is midnight local time, which I presume it's what you want. What you going to do with it?