dateMath transform - Issue with now keyword

I get an error while using the dateMath transform. Transform:

        "now_180": {
            "attributes": {
                "expression": "now+180d/d",
                "roundUp": false
            },
            "type": "dateMath"
        },

Error:

There was an exception while calculating the value for this attribute. java.lang.IllegalArgumentException: DateMathTransform requires an input date or date expression with 'now'

I am using an expression with the now keyword. What am i missing?

Hello @spetursson,

What you have is valid if you are looking to use now_180 as a variable in a static transform.

I am curious if this is the whole transform? If so then this is not valid.

If you just want to get the value of now+180 days by itself. The complete transform would be as follows:

{
  "name": "180DaysFromNow",
  "attributes": {
      "expression": "now+180d/d",
      "roundUp": false
   },
  "type": "dateMath"

Thanks Tyler
Correct, I am using the now_180 as a variable in a static transform. With that in mind, do you have any idea why it would be failing with the error message?

@spetursson,

Are you using dateMath anywhere else in the transform and would you be willing to post the full transform?

I tested the transform from above and do not receive any errors. I am curious if there is another issue in the transform that is causing this error to show.