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 datetime was not sufficient for this in my research.

For MySQL, the adddate() operator will do the trick:
  select theDate, adddate(theDate,interval -12 hour) from table;

Does Sqlite have this too?
Ruth
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to