On Thu, 2007-06-14 at 18:57 +0200, Nis Jorgensen wrote:
> ZebZiggle wrote:
> > Further investigation ... the sql looks good I think:
> >
> > ...
> > FROM ...
> > WHERE ( ...
> > AND "igapp_stockticker"."moment" < 2007-06-14 05:00:00
> > AND "igapp_stockticker"."moment" >= 2007-06-13 05:00:00)
> >
Actually ... scratch that last point ... my bad. I think I'm onto the
solution and the above query seems fine.
But there's definitely a django bug in there somewhere. I'll submit it
later.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Yes, and it gets worse. I changed my query to be:
ticks = list(StockTicker.objects.filter(exchange = 1) \
.extra(where = ["symbol = '@Gold' AND moment >= '%s' AND
moment < '%s' " % (postgresDate(start), postgresDate(end))]) \
.order_by('moment'))
(which works dire
ZebZiggle wrote:
> Further investigation ... the sql looks good I think:
>
> ...
> FROM ...
> WHERE ( ...
> AND "igapp_stockticker"."moment" < 2007-06-14 05:00:00
> AND "igapp_stockticker"."moment" >= 2007-06-13 05:00:00)
>
> Is there some special markup required for postgres to utilize the time
>
Further investigation ... the sql looks good I think:
...
FROM ...
WHERE ( ...
AND "igapp_stockticker"."moment" < 2007-06-14 05:00:00
AND "igapp_stockticker"."moment" >= 2007-06-13 05:00:00)
Is there some special markup required for postgres to utilize the time
info?
Baffled.
PS> Yes, the data
Howdy!
Starting with something like this:
start = 9pm on Monday
end = 3am on Tuesday
table.objects.filter(moment__range=(start, end))
Only brings back data until midnight on Monday.
Shouldn't range use the time component of a datetime?
Am I missing something?
Thx in advance,
Sandy
--~--~-
6 matches
Mail list logo