帆软填报计算在岗年资,比较日期格式大小,计算日期间隔,获取当前月份最后一天
MAX(DATEDIF(DATE1,DATE3,"D")/30,DATEDIF(DATE2,DATE3,"D")/30)
#从DATE1,DATE2里面计算与DATE3间隔时间最久的日期差
+
DATEDIF(
CONCATENATE(LEFT(DATE3,6),"/",SQL("150DB", "SELECT TO_NUMBER(to_char(LAST_DAY(SYSDATE-1),'dd')) FROM dual", 1, 1))#concatenate拼接获取DATE3当月最后一天
,DATE3,"D"#datedif函数(startdate,enddate,格式d)
)/30