Answer the question
In order to leave comments, you need to log in
GROUP BY DATE(table.datetime_field) in Django?
you need to select the number by day, in sql it's easy
SELECT
sum(some_table.items)
FROM
some_table
WHERE
some_table.datetime_field > '2021-09-01'
GROUP BY DATE(some_table.datetime_field)
Answer the question
In order to leave comments, you need to log in
Why google if everything is in the documentation? Fields of type DateTimeField have a date lookup .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question