How to write global absence carryover fast formula
Hi,
We had a requirement to write a carryover fast formula to carry forward a maximum of 8 days and minimum is 0 from the previous year’s annual leave. The leave cycle is from 01-Jan to 31-Dec.
We had developed a Fast Formula for this, but unfortunately, it is not functioning as expected. We would appreciate it if anyone could provide guidance on how to achieve this functionality.
Code Snippet :
ld_effective_date= GET_CONTEXT(EFFECTIVE_DATE,'4712/12/31 00:00:00'(date))
l_calendar_start_date = to_date('01/01/'||to_char(ADD_YEARS(ld_effective_date,-1),'YYYY'),,'DD/MM/YYYY')
l_calendar_end_date = to_date('31/12/'||to_char(ADD_YEARS(ld_effective_date,-1),'YYYY'),'DD/MM/YYYY')