Hello,
I would like to be able to modify a date stored in dynamic content and use that in my flows. My code below just treats my operators as a string, so the output is something like "3/15/2017 - 14" where instead I would like it to be "3/1/2017"
Thank you all
Thank you for this!
Hi @ChrisC,
Yes, there is a way to return the results without quotes.
After the trigger action, add a Compose Action, then copy and paste the following in the Compose Input box:
"@Adddays(triggerBody()?['StartDate'],-14,'MM/dd/
After that, use the Compose output as results.
See screenshots:
Reply back if you need any further assistance.
Regards
That is fantastic @v-micsh-msft! It works wonderfully.
I have to ask - the result returns in quotes. Is there any way around this? Ex: The input is 3/24/2017, but the output is "3/10/2017", quotes included. Is there any way to return the result without the surrounding quotes?
Hi @ChrisC,
You need to take use of the Workflow Definition Language to deal with that.
Could you please share about the previous steps, better with a screenshot of your flow?
Using WDL would need to translate the Dynamic content into content that could be understood by the language.
For example, if the previous step is "When a new event is created" (I suspect),
Then we need to change the Body input of the Send an Email action with the formula below:
"@{Adddays(triggerBody()?['StartDate'],-14,'MM/dd/yyyy')}"
if the previous step is not a trigger, then I would need more information to make it work.
Adding the workflow Definition language as the reference:
Regards