      >>> Experiment.objects.create(start_time=datetime(2015, 6, 15, 14, 30, 50, 321))
      >>> Experiment.objects.create(start_time=datetime(2015, 6, 15, 14, 40, 2, 123))
      >>> Experiment.objects.create(start_time=datetime(2015, 12, 25, 10, 5, 27, 999))
      >>> experiments_per_day = Experiment.objects.annotate(
      ...    start_day=Trunc('start_time', 'day', output_field=DateTimeField())
      ... ).values('start_day').annotate(experiments=Count('id'))
      >>> for exp in experiments_per_day:
      ...     print(exp['start_day'], exp['experiments'])
      ...
      2015-06-15 00:00:00 2
 
</s> remove     >>> Experiment.objects.create(start_time=datetime(2015, 6, 15, 14, 30, 50, 321))
    >>> Experiment.objects.create(start_time=datetime(2015, 6, 15, 14, 40, 2, 123))
    >>> Experiment.objects.create(start_time=datetime(2015, 12, 25, 10, 5, 27, 999))
 </s> add     >>> Experiment.objects.create(start_datetime=datetime(2015, 6, 15, 14, 30, 50, 321))
    >>> Experiment.objects.create(start_datetime=datetime(2015, 6, 15, 14, 40, 2, 123))
    >>> Experiment.objects.create(start_datetime=datetime(2015, 12, 25, 10, 5, 27, 999)) </s> remove     ...    start_day=Trunc('start_time', 'day', output_field=DateTimeField())
 </s> add     ...    start_day=Trunc('start_datetime', 'day', output_field=DateTimeField()) </s> remove     >>> Experiment.objects.create(start_time=start1, start_date=start1.date())
    >>> Experiment.objects.create(start_time=start2, start_date=start2.date())
    >>> Experiment.objects.create(start_time=start3, start_date=start3.date())
 </s> add     >>> Experiment.objects.create(start_datetime=start1, start_date=start1.date())
    >>> Experiment.objects.create(start_datetime=start2, start_date=start2.date())
    >>> Experiment.objects.create(start_datetime=start3, start_date=start3.date()) </s> remove     ...     print(exp.start_time)
 </s> add     ...     print(exp.start_datetime) </s> remove     >>> Experiment.objects.create(start_time=start1, start_date=start1.date())
 </s> add     >>> Experiment.objects.create(start_datetime=start1, start_date=start1.date())
    ...    start_day=Trunc('start_datetime', 'day', output_field=DateTimeField())
      >>> Experiment.objects.create(start_time=datetime(2015, 6, 15, 14, 30, 50, 321))
      >>> Experiment.objects.create(start_time=datetime(2015, 6, 15, 14, 40, 2, 123))
      >>> Experiment.objects.create(start_time=datetime(2015, 12, 25, 10, 5, 27, 999))
      >>> experiments_per_day = Experiment.objects.annotate(
    ...    start_day=Trunc('start_datetime', 'day', output_field=DateTimeField())
      ... ).values('start_day').annotate(experiments=Count('id'))
      >>> for exp in experiments_per_day:
      ...     print(exp['start_day'], exp['experiments'])
      ...
      2015-06-15 00:00:00 2
keep keep keep keep replace keep keep keep keep keep
 Refs #25774 -- Adjusted datetime database function docs field names. 
docs/ref/models/database-functions.txt