2

I have a datetimefield: 2013-03-14 17:30:21
I want to query ONLY by the time, ignoring the date.

Like this:

list = MyModel.filter(dateTimeField_time_gte = '09:00:00', dateTimeField_time_lte = '10:00:00')

but it doesn't work.

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
brunozrk
  • 773
  • 1
  • 7
  • 14

1 Answers1

0

See this Stack Overflow question for some insights on how to filter by a date or time range: Django model timerange filtering method

Community
  • 1
  • 1
Brandon Taylor
  • 33,823
  • 15
  • 104
  • 144