当我使用datediff(StartDate,SubmittedOn)时,我只得到int类型的days,这是不准确的。那么,怎样才能拿到最晚的那一个呢?谢谢。StartDate SubmittedOn what I get using datediff what I am tring to get
9/7/2016 13:12
我需要比较两个日期,并返回两个小数位之间的天数。所以我会返回0.2天CAST(DATEDIFF(Hour, SubmittedDate, FirstCall)/30.0 AS DECIMAL(5,2)) As HoursBeforeFirstCallCAST(DATEDIFF(Day, SubmittedDate, FirstCall) AS DECIMAL(5,2)) As HoursBeforeFirstCall
似乎都不管用。
QList.find_by_sql("select end_time from q_lists where id = #{a.id}")ERROR 1582 (42000): Incorrect parameter count in the call to native function 'DATEDIFF'
我该怎么解决这个问题