Jul 09, 2023 02:00 PM - edited Jul 09, 2023 02:00 PM
Hello all, I'm working with formulas, but got stuck on something. What I'm trying to accomplish here is simple, but not sure how to formulate it. I have a linking record for an invoice for NET Terms: NET15, 30 etc.
I have the formula set up, but I want that converted into a date format rather than what I have.
IF({TERM}="NET15", "15 Days from 'Due Date'",
IF(
{TERM}="NET30", "30 days from 'Due Date'"
)
)
Simple, but this is the output:
Pretty simple, however I was testing the formula, and for invoice structure - I wanted a date format approach. So If NET15, then have the "Due Date" 15 days BASED off of the "Date" field. I don't know how I'd structure that, but that's the primary goal. Instead of showcasing "15 days from 'Due Date'", I'd rather it show a date format.
EX: Date: 7/9/2023 Due Date: 7/24/2023 TERM: NET15
Any advice would be helpful! Thanks.
Solved! Go to Solution.
Jul 09, 2023 02:19 PM - edited Jul 09, 2023 02:20 PM
Hi @krtphr
Try this formula
IF({TERM}="NET15", DATETIME_FORMAT(DATEADD({Date},-15,'days'),"MM/DD/YYYY")
,
IF(
{TERM}="NET30", DATETIME_FORMAT(DATEADD({Date},-30,'days'),"MM/DD/YYYY")
)
)
Jul 09, 2023 02:19 PM - edited Jul 09, 2023 02:20 PM
Hi @krtphr
Try this formula
IF({TERM}="NET15", DATETIME_FORMAT(DATEADD({Date},-15,'days'),"MM/DD/YYYY")
,
IF(
{TERM}="NET30", DATETIME_FORMAT(DATEADD({Date},-30,'days'),"MM/DD/YYYY")
)
)
Jul 09, 2023 02:55 PM - edited Jul 09, 2023 03:09 PM
This works perfectly, thank you so much. I edited it to add, instead of subtract.