Apr 04, 2023 11:14 AM
I have a formula which calculates the # of days between two dates. I want to add if the resulting value is <0, then the value should be set to 0, otherwise, keep the value.
This is the calculate of two dates. How do i add the second part? I tried nesting, but that didnt work,
Solved! Go to Solution.
Apr 04, 2023 11:47 AM
Hey @rfscott2016,
I haven't tested this, but this is generally what you're looking for:
IF(
OR(
{🚩Workflow Status} = "Complete",
{🚩Workflow Status} = "Released to Customer"
),
IF(
DATETIME_DIFF(
{🚩Actual Eng. Delivery Date},
{🚩Original Planned P50 Date},
'days'
) < 0,
0,
DATETIME_DIFF(
{🚩Actual Eng. Delivery Date},
{🚩Original Planned P50 Date},
'days'
)
)
)
Apr 04, 2023 11:47 AM
Hey @rfscott2016,
I haven't tested this, but this is generally what you're looking for:
IF(
OR(
{🚩Workflow Status} = "Complete",
{🚩Workflow Status} = "Released to Customer"
),
IF(
DATETIME_DIFF(
{🚩Actual Eng. Delivery Date},
{🚩Original Planned P50 Date},
'days'
) < 0,
0,
DATETIME_DIFF(
{🚩Actual Eng. Delivery Date},
{🚩Original Planned P50 Date},
'days'
)
)
)