Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

How to subtract two dates and get the result in integer to compare with integer?


I have an entity in Microsoft Dynamics 365 CRM in which I have a submission date. What I want is to make an assistant card in Dynamics 365 CRM using Microsoft Flow that will be triggered before 7 days to the Submission date. 

I don't know how I can subtract two dates and get the result in an integer which I can compare with an integer value.

The condition will be something like this.

If((Submission Date - Current Date) <= 7 Days)

then show the assistant card,

Else do nothing.


I don't know how to achieve this in Microsoft Flow.


Any help or suggestion would be highly appreciable.



Waleed bin Afzal.

Super User
Super User

Re: How to subtract two dates and get the result in integer to compare with integer?

Hi, see the response to your question on this at

Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.


Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 163 members 5,472 guests
Please welcome our newest community members: