I am facing the issue while trying to get the below mentioned logic through subtractdays() function.
logic: we need the value i.e. current date - 74 days
used expression: subtractdays(today(), 74)
error found:
Discussion posts and replies are publicly visible
hi om786 what is the function you are using is that a plugin function? may your complete requirements and expected output please, currently you can directly do todate(today()-74) gives you 74 days back date.
Hi Abhishek Karumuru
i have below mentioned code
if( todate(fv!item.LastApproveDate) <= today() - ( cons!PPA_USER_APPROVAL_INTERVAL + cons!PPA_USER_APPROVAL_ESCALATION_INTERVAL ), true(), false() )
Where i need to replace this part of logic
today() - (cons!PPA_USER_APPROVAL_INTERVAL + cons!PPA_USER_APPROVAL_ESCALATION_INTERVAL)
with
substractdays fucntion
subtractdays() expects dateTime as its first input. But here, today() is of type date.
aryan
then how can we put current date by default in this parameter
We can use now()
The function "today()" returns only date not time. For the subtractDay() function, the first parameter you should pass date and time. I am attaching the snippet. Maybe it will be helpful.