cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
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. 

 

Regards, 

MB3

 

2 REPLIES 2
v-yamao-msft
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.
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

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.
ManjunathaReddy
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

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,240)