#16023: Range query on a datetime is NOT inclusive with dates
-------------------------------------+-------------------------------------
     Reporter:  jodym@…              |                    Owner:  Aymeric
                                     |  Augustin
         Type:  Bug                  |                   Status:  closed
    Component:  Documentation        |                  Version:  1.4
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by suhailvs):

 i would add 1 day to `end_date`, ie:
 {{{
 import datetime
 Transaction.objects.filter(posted__gte=start_date,
 posted__lt=end_date+datetime.timedelta(days=1))
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16023#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/080.fac67dff60bc81e6615882e7be884922%40djangoproject.com.

Reply via email to