Query datetime by today's date in Django

前端 未结 7 487
梦谈多话
梦谈多话 2021-01-31 08:16

I\'m saving datetime in the db for an object. I\'d like to query against the db and select anything from todays date, not datetime.

What\'s the

相关标签:
7条回答
  • 2021-01-31 08:54
    obj = TeachersPlanner.objects.filter(date__startswith=date.today())
    
    0 讨论(0)
提交回复
热议问题