In the model 'entered' is a datetime field. I want to query the data to find all entry's that where made between noon(start\_time) and 5:00pm (end\_time).

```
selected = Entry.objects.filter(entered__gte=start_time, entered__lte=end_time)

```

(as I expected)I get an error of:

```
"ValidationError: Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format."

```

So I know I can use \_\_year so I tried.

```
selected = Entry.objects.filter(entered__time__gte=start_time, entered__time__lte=end_time)

```

I get an error of:

```
"FieldError: Join on field 'start' not permitted. Did you misspell 'time' for the lookup type?"

```