Re: extend queryset field lookups for time

2010-01-26 Thread Malcolm Box
On Tue, Jan 26, 2010 at 9:14 AM, Henrik Genssen wrote: > how would I extend the field lookup to get somethnng like this: > > SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20 > what is for MYSQL: > SELECT ... WHERE HOUR(pub_date) > 20 > to get all entries where the timepart of pub_date is grate

extend queryset field lookups for time

2010-01-26 Thread Henrik Genssen
Hi, how would I extend the field lookup to get somethnng like this: SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20 what is for MYSQL: SELECT ... WHERE HOUR(pub_date) > 20 to get all entries where the timepart of pub_date is grater then 8pm and how would I change the existing of YEAR, MONTH

Re: extend queryset field lookups for time

2009-12-18 Thread hinnack
has nobody an idea for this? Hour and Minute itself seems to be easy - should just be added to where.py WhereNode class => make_atom() - but how to extend the functionality to greater / lower? -- Hinnack On Nov 27, 2:53 pm, Hinnack wrote: > Hi, > > how would I extend the field lookup to get som

extend queryset field lookups for time

2009-11-27 Thread Hinnack
Hi, how would I extend the field lookup to get somethnng like this: SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20 what is for MYSQL: SELECT ... WHERE HOUR(pub_date) > 20 to get all entries where the timepart of pub_date is grater then 8pm and how would I change the existing of YEAR, MONTH