Get data of the time range of a month

i’m trying to get all data of a time range and my query looks like this:

SELECT * FROM Aktuelle_Temperatur WHERE time >= ‘2021-05-01’ AND time <= ‘2021-05-31’;

I’m not getting the entry’s of last day so the ‘2021-05-31’ and i know that there are entry’s in that day.
The last entry i’m getting is from the ‘2021-05-30’, so the “<=” is not working because it give me the same result when i use just “<”.

Best regards

That is because “2021-05-31” is a short form of “2021-05-31 00:00:00”.
therefore it stops at midnight at the beginning of that day.

Try the query “where time>‘2021-05-01’ and time<‘2021-06-01’” insetad :slight_smile: