SELECT CEIL((UNIX_TIMESTAMP('2011-05-31 23:59:59') - UNIX_TIMESTAMP('2011-05-31 00:59:59'))/1000/60/60);
UNIX_TIMESTAMP('2011-05-31 23:59:59')//时间转换成毫秒
SELECT FROM_UNIXTIME(1306771200); //毫秒转换成时间
ceil()整数取整