Re: SQL Between query in sqlite3
Thank you Alex On Apr 11, 11:47 am, Alex Gaynorwrote: > On Sat, Apr 11, 2009 at 2:44 AM, Kenneth Gonsalves > wrote: > > > > > On Saturday 11 April 2009 11:16:52 Nalini wrote: > > > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' > > > Can any one help me? > > > Model.objects.filter(mydate__gte='2009-01-01' > > ).filter(mydate__lte='2009-01-31') > > -- > > regards > > kg > >http://lawgon.livejournal.com > > You can also do mydate__range=(datetime_obj1, datetime_obj2). > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: SQL Between query in sqlite3
Hi Kg, Thank you very much On Apr 11, 11:44 am, Kenneth Gonsalveswrote: > On Saturday 11 April 2009 11:16:52 Nalini wrote: > > > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' > > Can any one help me? > > Model.objects.filter(mydate__gte='2009-01-01' > ).filter(mydate__lte='2009-01-31') > -- > regards > kghttp://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: SQL Between query in sqlite3
On Sat, Apr 11, 2009 at 2:44 AM, Kenneth Gonsalveswrote: > > On Saturday 11 April 2009 11:16:52 Nalini wrote: > > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' > > Can any one help me? > > Model.objects.filter(mydate__gte='2009-01-01' > ).filter(mydate__lte='2009-01-31') > -- > regards > kg > http://lawgon.livejournal.com > > > > You can also do mydate__range=(datetime_obj1, datetime_obj2). Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: SQL Between query in sqlite3
On Saturday 11 April 2009 11:16:52 Nalini wrote: > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' > Can any one help me? Model.objects.filter(mydate__gte='2009-01-01' ).filter(mydate__lte='2009-01-31') -- regards kg http://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
SQL Between query in sqlite3
Hi, I am using django, python and sqlite3 for my web page. I want the datas from the database between two dates. how do i handle it in django. i want the query for this select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31' Can any one help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---