web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using operators on dyn...
Power Automate
Answered

Using operators on dynamic content in text field

(0) ShareShare
ReportReport
Posted on by 94

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"

 

Date Testing.PNG


Thank you all

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at

    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:

    Workflow Definition Language

    Regards

  • ChrisC Profile Picture
    94 on at

    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?

  • Verified answer
    v-micsh-msft Profile Picture
    on at

    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/yyyy')"

    After that, use the Compose output as results.

    See screenshots:

    77.PNG

    Reply back if you need any further assistance.

    Regards

  • ChrisC Profile Picture
    94 on at

    Thank you for this!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard