I am trying to pass in an integer parameter value to the DATETIME_ADD() function but it just yields an "Invalid formula" error:
DATETIME_ADD(TODAY(), INTERVAL my_parameter WEEK)
If I multiply or add another integer value on the parameter inside the function, I get an OK checkmark for the formula and it calculates correctly:
DATETIME_ADD(TODAY(), INTERVAL my_parameter * 2 WEEK)
If I do a calculation with non-integers and try to get the integer value of that calculation inside the function, I get the OK checkmark but the output fails with an error "Data Set Configuration Error":
DATETIME_ADD(TODAY(), INTERVAL FLOOR(my_parameter / 2) WEEK)
What on Earth's is happening and why can't all calculations be done on the parameter inside this function?
EDIT: Corrected WEEKS to WEEK in the formulas 🤦
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |