In [97]: cust = CustomerProfile.objects.get(pk=100)
In [98]: CustomerProfile.objects.filter(user__date_joined=datetime.datetime(2017, 7, 28))
Out[98]: <QuerySet []>
In [99]: CustomerProfile.objects.filter(user__date_joined=datetime.datetime(2017, 7, 28, 14, 43, 51, 925548))
Out[99]: <QuerySet [<CustomerProfile: George George's customer profile>]>
In [100]: cust
Out[100]: <CustomerProfile: George George's customer profile>
In [101]: cust.user.date_joined
Out[101]: datetime.datetime(2017, 7, 28, 14, 43, 51, 925548)
I am not sure why it is not working here just with the date 2017/07/28. Why is it empty with just the date? How could I obtain the last queryset with just the date and not all the stuff datetime.datetime(2017, 7, 28, 14, 43, 51, 925548)
?