8 Replies Latest reply: Nov 26, 2012 8:54 AM by 976169 RSS

    Timestampdiff  formula issues

    976169
      I'm trying to calculate the length of service using the following formula but I'm getting errors

      CASE WHEN TIMESTAMPDIFF(SQL_TSI_Month, "Employee Attributes"."Employee Last Hire Date",CURRENT_DATE) > 12 THEN TIMESTAMPDIFF(SQL_TSI_Month, "Employee Attributes"."Employee Last Hire Date",CURRENT_DATE) – TIMESTAMPDIFF(SQL_TSI_YEAR, "Employee Attributes"."Employee Last Hire Date",CURRENT_DATE)*12 ELSE TIMESTAMPDIFF(SQL_TSI_Month, "Employee Attributes"."Employee Last Hire Date",CURRENT_DATE) END

      I'm trying to show the result as # yrs # mths

      Can anybody please help

      Many Thanks

      Edited by: 973166 on Nov 26, 2012 2:13 AM

      Edited by: 973166 on Nov 26, 2012 2:28 AM