4
如何计算产品生产后的年数(四舍五入到小数点后1位)?谢谢。计算日期(SQL,Oracle 10g)
如何计算产品生产后的年数(四舍五入到小数点后1位)?谢谢。计算日期(SQL,Oracle 10g)
不是在IDE的前面,现在让我的语法可能是有点过,但这样的事情应该工作(假设名为table1与现场命名日期1台)......
select round((Months_between(current_date,date1)/12),1) as years
from table1 where date1 > add_months(current_date,-60)
+1:看起来对我来说是正确的 – 2010-03-19 02:55:15