Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Using DateDiff() in the compose action

(0) ShareShare
ReportReport
Posted on by

Hi , 

 

I am having a requirement to get the difference between 2 dates. I have formatted dates in the compose action & need to compare them. 

DateDiff("5/22/2018","9/20/2017",days) is displaying as is in compose action and doenot calculate. 

 

Looking for a suggestion. 

 

Regards, 

MB3

 

  • ManjunathaReddy Profile Picture
    8 on at
    Re: Using DateDiff() in the compose action

    Could you please let me know how to get difference between two dates using microsoft flows. If any that would be appriciated.

  • v-yamao-msft Profile Picture
    on at
    Re: Using DateDiff() in the compose action

    Hi MB3,

     

    Per my certain knowledge, currently there is no direct date function can be used to calculate days difference between two dates.

     

    If the two dates are within a month, we may consider to use a workaround by formatting the Date string, then convert the string into int, then get the date separately, then use sub function to calculate.

     

    It would be convenient to have a function likes DateDiff to count days between two dates, please consider to submit a request at Flow ideas Forum, I will help collect and report it on my side.
    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

    Best regards,
    Mabel Mao

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1