var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Datediff in Hours?
How can I subtract two datestamps (yyyy-mm-dd hh:mm:ss) to give the result in hours?
Originally Posted by Merlinius
You can convert both times to seconds using unix_timestamp. Then subtract one from other to get number of seconds between both times. Then divide by 3600 to get the number of hours ie
select ( unix_timestamp( "2008-01-28 10:00" ) -
unix_timestamp("2008-01-27 09:00" ) ) / 3600
Note that this only works if both dates are after 1970.
Originally Posted by mike_bike_kite
Nice one Mike