Thanks Massimo!
2011/7/21 Massimo Di Pierro massimo.dipie...@gmail.com:
it would be much easier to just provide a function row.field.asdate()
or row.field.astime()
How this could be done? Give me an hint and I'll procede by myself!
Thank you!
I think row.field.date() already works because row.field is a datetime
object
Sorry for being retarted!
I have this:
db.define_table('test', Field('comment','string'), Field('data','datetime'))
but the function:
def getcommentsbydate():
rows = db(db.test).select(db.test.data.comment, db.test.data.date())
return dict(rows=rows)
throws an exception complaining that
Thanks Massimo!
So I must traverse the list at least one time. I dont know how much
time is spent in this operation, but I have a very large number of
records, so I'll test this solution.
Thank you!
2011/7/21 Massimo Di Pierro massimo.dipie...@gmail.com:
No that does not work for the reasons
I don't know exactly how virtual fields are implemented (if it would prevent
another run through the result set) but might be another approach.
http://web2py.com/book/default/chapter/06#Virtual-Fields
I'll try to explain better.
I have to exctract some statistics from a radius accounting table that
is generally a really big table.
After exctracting tha data, i pass it to jqplot.com via a json service
to be rendered.
For some graphics, I have to exctract a big amount of dates from
accounting
6 matches
Mail list logo