Good hint, thanks, but anyway it's platform(sqlite) dependent.
Also thanks to Niphlod to have confirmed the same thing. Sometimes never
better choice.
On Saturday, May 31, 2014 3:23:44 AM UTC+7, Anthony wrote:
>
> Note, you can do:
>
> minus_5_min = 'DATETIME((writetime), "-5 minutes")'
> row =
Note, you can do:
minus_5_min = 'DATETIME((writetime), "-5 minutes")'
row = db(db.mytable).select(minus_5_min).first()
print row[minus_5_min]
Anthony
On Thursday, May 29, 2014 11:49:06 PM UTC-4, Pham Quang Dung wrote:
>
> Hm,
> Not true, I forgot to say I did with execlsql OK, for Sqlite,
> sel
perfect.
now find a way to do it on every supported backend, and for every possible
timedelta, than we'll include it ^_^.
On Friday, May 30, 2014 5:49:06 AM UTC+2, Pham Quang Dung wrote:
>
> Hm,
> Not true, I forgot to say I did with execlsql OK, for Sqlite,
> select DATETIME((writetime), "-5 mi
Hm,
Not true, I forgot to say I did with execlsql OK, for Sqlite,
select DATETIME((writetime), "-5 minutes") from xxx
On Friday, May 30, 2014 2:35:42 AM UTC+7, Niphlod wrote:
>
> This will never work because there is no notion of "timedelta" in any db
> backend (nor any substitute for it).
> Cal
This will never work because there is no notion of "timedelta" in any db
backend (nor any substitute for it).
Calculate the result AFTER fetching the rows from the db.
On Thursday, May 29, 2014 12:32:41 PM UTC+2, Pham Quang Dung wrote:
>
> I tried a query like *db().select(xx.writetime - timedel
5 matches
Mail list logo