好象没有:
  用query
  query.sql.add(SELECT DATEDIFF(day, now1, now2) AS no_of_days') ;

解决方案 »

  1.   

    同意chechy(chechy)的意见,相减好的数值可以通过函数分解后获得天数和时间
      

  2.   

    showmessage(timetostr(strtotime('6:20:34')-strtotime('7:10:12'))) 
      

  3.   

    procedure tform1.button1click(sender:tobject);
    var
      year,month,day,hour,min,sec,msec:word;
    begin
      decodedate(now,year,month,day);  //分解日期
      canvas.textout(10,10,'今天是'+inttostr(year)+'年'+inttostr(month) 
                     +'月'+inttostr(day)+'日');
      decodetime(now,hour,min,sec,msec);  //分解时间
      canvas.textout(10,30,'现在是'+inttostr(hour)+'时'+inttostr(min)+'分'+
                     inttostr(sec)+'.'+inttostr(msec)+'秒');
    end;