I have a datetime field, and I want to filter the rows that has the same date value.
models.py
class EntryMonitoring(models.Model): student = models.ForeignKey('Student', models.DO_NOTHING) clockin = models.DateTimeField() clockout = models.DateTimeField(null=True)views.py
def check_attendance(request, nid): day = EntryMonitoring.objects.filter( clockout__isnull=False, '# same value', student=nid ).annotate(...) # do somethingI wanted to add inside that filter query that clockin__date has the same value as clockout__date. Is that possible? If it is, what would be the right query to filter it?