Re: [sqlite] Using modifiers in julianday function

2011-10-24 Thread Dilip Ranganathan
On Mon, Oct 24, 2011 at 11:47 AM, Doug Currie wrote: > > On Oct 24, 2011, at 11:07 AM, Dilip Ranganathan wrote: > > > But as you all know, this doesn't work: > > > > select datetime(time) from table where time >= > > julianday(datetime(max(time)),'-2 hour','localtime') order by time desc > > Try

Re: [sqlite] Using modifiers in julianday function

2011-10-24 Thread Doug Currie
On Oct 24, 2011, at 11:07 AM, Dilip Ranganathan wrote: > But as you all know, this doesn't work: > > select datetime(time) from table where time >= > julianday(datetime(max(time)),'-2 hour','localtime') order by time desc Try replacing datetime(max(time)) with (select datetime(max(time)) from t

[sqlite] Using modifiers in julianday function

2011-10-24 Thread Dilip Ranganathan
Lets say I have a column named 'time' that stores timestamps as juliandays. Suppose I only want to extract rows for the past 2 hours from now, I could do: select datetime(time) from table where time >= julianday('now','-2 hour','localtime') order by time desc That works as expected. However what