Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using DateDiff() in the compose action

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. 





Community Support
Community Support

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.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

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

Helpful resources

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (1,846)