Black, Michael (IS) wrote:
> sqlite> create table t(d date);
> sqlite> insert into t values('2011-12-31 09:00');
> sqlite> insert into t values('2011-12-31 12:15');
> sqlite> select d,substr(datetime(d,'-12 hours'),1,16) from t;
> 2011-12-31 09:00|2011-12-30 21:00
> 2011-12-31 12:15|2011-12-31 00:
On 17/06/2011 12:10, looki wrote:
> First column holds the givin datetime from my table and the second column
> should show the datetime from first row but 12 hours before. for example:
>
> '2011-12-31 09:00' '2011-12-30 21:00'
> '2011-12-31 12:15' '2011-12-30 00:15'
> ...
>
> looks simple but date
ers@sqlite.org
Subject: EXT :[sqlite] need help with a query using datetime
Hi,
i have a table which holds dates like
'2011-12-31 09:00' and i now want to write a query which gives me 2 columns.
First column holds the givin datetime from my table and the second column
should show
Hi,
i have a table which holds dates like
'2011-12-31 09:00' and i now want to write a query which gives me 2 columns.
First column holds the givin datetime from my table and the second column
should show the datetime from first row but 12 hours before. for example:
'2011-12-31 09:00' '2011-12-3
4 matches
Mail list logo