Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个日期时间字段:2013-03-14 17:30:21 我只想按时间查询,而忽略日期。
像这样:
list = MyModel.filter(dateTimeField_ time _gte = '09:00:00', dateTimeField_ time _lte = '10:00:00')
但它不起作用。
有关如何按日期或时间范围过滤的一些见解,请参阅此 Stack Overflow 问题:Django 模型时间范围过滤方法