Challenge with TIMESTAMPADD function not returning correct results
Summary:
When I add X number of years to a date field the formula produces a wrong date.
Content (required):
I build an OTBI analysis based on Workforce Management - Person Seniority Real Time subject area.
It needs to display Anniversary Date. For an employee with a hire date of Mar 03, 2022 it has to display Mar 03 2023.
When I calculate YEAR(CURRENT_DATE) - YEAR("Worker"."Enterprise Hire Date") it produces 1.
When I calculate TIMESTAMPADD(SQL_TSI_YEAR, 1, "Worker"."Enterprise Hire Date") it produces 2023/03/03.
But when I calculate TIMESTAMPADD(SQL_TSI_YEAR, YEAR(CURRENT_TIMESTAMP) - YEAR("Worker"."Enterprise Hire Date"), "Worker"."Enterprise Hire Date") it produces
Tagged:
0