SOLVED - Read from Influxdb stop working after last HA update

I updated HA to the last version, and after taht the node to red from inluxdb stops working. I have as example the following nodes:

In the function node I have:

var fecha = new Date();
var variable = new Date();
var anyo = fecha.getFullYear();
var mes = fecha.getMonth();
mes = mes+1;
mes = "0" + mes;
mes = mes.slice(-2);

msg.query="SELECT mean(\"potencia\") FROM \"mqtt_consumos2\" WHERE time>='"+ anyo + "-" + mes + "-18'";

return msg;

This code is working just before the update, and now is not working…
I tried to update also influxdb to the last update and also node red, but continues not working.
The node to write to inluxdb continues working without any problem.
Any idea about this?.

Thanks,

what error message or debug message do you get?
did you look at the table in the DB to make sure the data is still there?

I don’t get any error, but the result from the query is empty:

image

And is not possible that this query show empty values…

Solved, the problem is with the month change…, I need to modify the function node.

Jose