- Issue created by @maxilein
- 🇦🇹Austria maxilein
here is the relevant part of the views SQL
AND ((DATE_FORMAT((node__field_zeitraum.field_zeitraum_value + INTERVAL 7200 SECOND), '%Y-%m-%d\T%H:%i:%s') BETWEEN DATE_FORMAT(('2024-03-01T18:01:47' + INTERVAL 7200 SECOND), '%Y-%m-%d\T%H:%i:%s') AND DATE_FORMAT(('2024-03-31T17:01:47' + INTERVAL 7200 SECOND), '%Y-%m-%d\T%H:%i:%s')))
- 🇦🇹Austria maxilein
Looking into the data it is only the 1st of march that is not included.
Researching more shows that there is a fundamental problem:
https://stackoverflow.com/questions/5080824/mysql-between-clause-not-inc...
and
https://stackoverflow.com/questions/53059477/sql-query-for-mysql-for-bet...
One comment mentions:
Won't include 2011-01-31 23:59:59.003. @nitrogen using 2011-02-01 000:00:00 will incorrectly include zero time on 1st February.... Which is why >= and < should be used instead.
But I think >= and <= should be used in sql-statement to get as close as possible to an inclusive BETWEEN-functionality as possible.