      ...    start_time=start, start_date=start.date(),
      ...    end_time=end, end_date=end.date())
      >>> # Add the experiment start year as a field in the QuerySet.
      >>> experiment = Experiment.objects.annotate(
      ...    start_year=Extract('start_time', 'year')).get()
      >>> experiment.start_year
      2015
      >>> # How many experiments completed in the same year in which they started?
      >>> Experiment.objects.filter(
      ...    start_time__year=Extract('end_time', 'year')).count()
 
</s> remove     ...    start_time=start, start_date=start.date(),
    ...    end_time=end, end_date=end.date())
 </s> add     ...    start_datetime=start, start_date=start.date(),
    ...    end_datetime=end, end_date=end.date()) </s> remove     ...    start_time__year=Extract('end_time', 'year')).count()
 </s> add     ...    start_datetime__year=Extract('end_datetime', 'year')).count() </s> remove     ...     print(exp.start_time)
 </s> add     ...     print(exp.start_datetime) </s> remove     ...        day=ExtractDay('start_time'),
    ...        weekday=ExtractWeekDay('start_time'),
    ...        hour=ExtractHour('start_time'),
 </s> add     ...        day=ExtractDay('start_datetime'),
    ...        weekday=ExtractWeekDay('start_datetime'),
    ...        hour=ExtractHour('start_datetime'), </s> remove     ...    start_day=Trunc('start_time', 'day', output_field=DateTimeField())
 </s> add     ...    start_day=Trunc('start_datetime', 'day', output_field=DateTimeField())
    ...    start_year=Extract('start_datetime', 'year')).get()
      ...    start_time=start, start_date=start.date(),
      ...    end_time=end, end_date=end.date())
      >>> # Add the experiment start year as a field in the QuerySet.
      >>> experiment = Experiment.objects.annotate(
    ...    start_year=Extract('start_datetime', 'year')).get()
      >>> experiment.start_year
      2015
      >>> # How many experiments completed in the same year in which they started?
      >>> Experiment.objects.filter(
      ...    start_time__year=Extract('end_time', 'year')).count()
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