Hi! I´m trying to query a database which has:
- A date field (month-day-year)
- A number of days to add (integer)
I want to use a query in order to add the number of days (integer, I want it to be days) to the date field, and return a date field.
I tried the following query but it doesnt work (returns null). And the function ADD_DATE is not able in appian. What can i do?
Discussion posts and replies are publicly visible
You can fetch the date and the no of days to be added from the database to expression rule using the query entity and follow the below code for the desired Output. If you want to add multiple data you can use forEach().
a!localVariables( /* Fetch the date and no of days to be added using query entity*/ local!date:today(), local!noOfDays:2, local!result:local!date+local!noOfDays, local!result )
In the end I just made a sum of the process variables in the e-mail form, that was enough for me. Also, in the database I could do the same with a new custom record. Thanks!