Re: [sqlite] Difference between times.

2010-10-21 Thread Danilo Cicerone
Thanks Simon, GREAT solution!!! A very interesting sintax. 2010/10/21 Simon Davies > On 21 October 2010 11:58, Danilo Cicerone wrote: > > Thanks Simon, but I've the following situation: > > > . > . > . > > The SQL query should be something like

Re: [sqlite] Difference between times.

2010-10-21 Thread Simon Davies
On 21 October 2010 11:58, Danilo Cicerone wrote: > Thanks Simon, but I've the following situation: > . . . > The SQL query should be something like that: > > select case when dateStart <= '2010-01-21 00:00:00' and dateEnd >= > '2010-01-21 > 00:00:00' then > strftime('%s',

Re: [sqlite] Difference between times.

2010-10-21 Thread Danilo Cicerone
Thanks Simon, but I've the following situation: BEGIN TRANSACTION; CREATE TABLE t1( id integer primary key, dateStart text, -- '-MM-DD HH:MM:SS' dateEnd text -- '-MM-DD HH:MM:SS' ); INSERT INTO "t1" VALUES(1,'2010-01-20 18:00:00','2010-01-21 02:00:00'); COMMIT; and I'd like to know how

Re: [sqlite] Difference between times.

2010-10-21 Thread Simon Davies
On 21 October 2010 11:03, Danilo Cicerone wrote: > Hi to all, > I'd like to calculate hours and minutes having the following situation where > A and B are query, B and C are the data stored in a table: ? B is query and data? > > ->Time > >  A          

[sqlite] Difference between times.

2010-10-21 Thread Danilo Cicerone
Hi to all, I'd like to calculate hours and minutes having the following situation where A and B are query, B and C are the data stored in a table: ->Time A B | | C D | | A = '2010-01-20 09:00:00' B =