Aug 22, 2023 05:34 PM
I've tried this several times and nothing I do seems to work. I'm trying to wrap this formula in an IF(ISERROR( so that if there is an error it stays blank and I can't get it to work. I'm working with a formula field that sometimes displays text and sometimes a date. if it's a date, it should be used in the formula to give me the new date and if it's text, I just want the new field to remain blank.
IF(
AND(
{PAY2 TV From}="PAY1",
{PAY1 Formula/Manual}
),
DATETIME_FORMAT(DATEADD({PAY1 Formula/Manual},{PAY2 TV Amount},{PAY2 TV Time Frame}),"LL"),
IF(
AND(
{LTR},
{PAY2 TV From}="LTR"
),
DATETIME_FORMAT(DATEADD({LTR},{PAY2 TV Amount},{PAY2 TV Time Frame}),"LL"),
""
)
)
Solved! Go to Solution.
Aug 22, 2023 06:38 PM - edited Aug 22, 2023 07:25 PM
Need to determine if the output of the "PAY1 Formula/Manual" field is a date or a string
IF(
AND(
{PAY2 TV From}="PAY1",
NOT(ISERROR(DATESTR(({PAY1 Formula/Manual})))
),
DATETIME_FORMAT(DATEADD({PAY1 Formula/Manual},{PAY2 TV Amount},{PAY2 TV Time Frame}),"LL"),
IF(
AND(
{LTR},
{PAY2 TV From}="LTR"
),
DATETIME_FORMAT(DATEADD({LTR},{PAY2 TV Amount},{PAY2 TV Time Frame}),"LL"),
""
)
)
Aug 22, 2023 06:38 PM - edited Aug 22, 2023 07:25 PM
Need to determine if the output of the "PAY1 Formula/Manual" field is a date or a string
IF(
AND(
{PAY2 TV From}="PAY1",
NOT(ISERROR(DATESTR(({PAY1 Formula/Manual})))
),
DATETIME_FORMAT(DATEADD({PAY1 Formula/Manual},{PAY2 TV Amount},{PAY2 TV Time Frame}),"LL"),
IF(
AND(
{LTR},
{PAY2 TV From}="LTR"
),
DATETIME_FORMAT(DATEADD({LTR},{PAY2 TV Amount},{PAY2 TV Time Frame}),"LL"),
""
)
)
Aug 23, 2023 09:49 AM
Amazing that worked beautifully!!