The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
date_add and macro dont work
Hi everybody, I try to search in the forum and google for this, but I cant find the answer..
I'm trying to loop between dates, but the filter example box dont work when I try to put a macro variable in to date_add:
This is the code:
date_before([Fecha de Pago],date_add(date_parse_custom(%{max_date},"yyyy-MM-dd"),-%{iteration},DATE_UNIT_MONTH))
&&
date_after([Fecha de Pago],date_add(date_parse_custom(%{max_date},"yyyy-MM-dd"),-%{iteration}-12,DATE_UNIT_MONTH))
when I replace the "{%iteration}" with a number, the process work, but with the macro dont. The error was:
"The function date_add must have an argument of type 'integer' as 'second' argument.
How I can Fix that? How I can make the process iterate between dates?
I'm trying to loop between dates, but the filter example box dont work when I try to put a macro variable in to date_add:
This is the code:
date_before([Fecha de Pago],date_add(date_parse_custom(%{max_date},"yyyy-MM-dd"),-%{iteration},DATE_UNIT_MONTH))
&&
date_after([Fecha de Pago],date_add(date_parse_custom(%{max_date},"yyyy-MM-dd"),-%{iteration}-12,DATE_UNIT_MONTH))
when I replace the "{%iteration}" with a number, the process work, but with the macro dont. The error was:
"The function date_add must have an argument of type 'integer' as 'second' argument.
How I can Fix that? How I can make the process iterate between dates?
0
Answers
Macros take the format %{iteration} rather than {%iteration} as you have. That would do it.
Best
H
What can I do?
Thanks.