Hello
i have a query
SELECT MIN(temp_mix) as MaMeMi24hd_MIN
FROM spez_days
WHERE time > now()-30d
which works like this.
But would it be possible to have something like
WHERE time = this Month
or
WHERE time > now() - beginMonth
Hello
i have a query
SELECT MIN(temp_mix) as MaMeMi24hd_MIN
FROM spez_days
WHERE time > now()-30d
which works like this.
But would it be possible to have something like
WHERE time = this Month
or
WHERE time > now() - beginMonth
You can use something like WHERE time > '2022-05-01T00:00:00.000000000Z'
You can calculate in a function the first day of the month and use that in your query.
var date = new Date(), y = date.getFullYear(), m = date.getMonth();
var firstDay = new Date(y, m, 1);
msg.payload= firstDay
return msg;
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.