Filter a field with timestamp (datetime) using today's date in Django
I have a Django model with a timestamp field. I want to filter and get the number of rows containing today's date. The timestamp field contains date, time and time zone.
I tried this:
today_date = date.today().strftime("%Y-%m-%d" ) Pending = tablename.objects.filter(timestamp=today_date,).count()
But I got zero (0).
Thank you.