You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Challenge with TIMESTAMPADD function not returning correct results

Received Response
39
Views
11
Comments

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!