class TruncSecond(expression, output_field=None, tzinfo=None, **extra) [source]
kind = 'second'
These are logically equivalent to Trunc('datetime_field', kind). They truncate all parts of the date up to kind and allow grouping or filtering datetimes with less precision. expression must have an output_field of DateTimeField.
Usage example:
>>> from datetime import date, datetime
>>> from django.db.models import Count
>>> from django.db.models.functions import (