Skip to Content
-1

Is it possible to use Input Parameter in ADDMONTHS ( ) function in a calculated column?

Hi Experts,

Addmonths ( ) function is perfectly worked for columns.

Example:

ADDMONTHS(col_name,2)

But It wont work when I use Input Parameters inside that function.

Example:

ADDMONTHS($$IP_DATE$$,2)

when I use the above expression it throws an error like as invalid Expression.

Input Parameter Datatype is Date.

And,I also tried with the integer Datatype., It won't works.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 02 at 01:53 PM

    For the column engine no such function exists. In the SQL engine the function is called ADD_MONTHS (not ADDMONTHS). Using it in an SQL engine calculated column, when putting the parameter name in single quotes works quite will (if a syntax validation error occurs, just ignore it).

    ADD_MONTHS('$$IP_DATE$$', 2)

    Regards,
    Florian

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Florian Pfeffer ,

      If I validate the Below expression It throws an error like Invalid Expression... I just ignoire it and activate the view.

      ADDMONTHS('$$IP_DATE$$',2)

      Its activated Successfully and got my desired output..

      It works Perfectly...