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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Subtract two da...
Power Automate
Answered

How to Subtract two dates and get the result in an integer to to compare with integer value?

(0) ShareShare
ReportReport
Posted on by 41

Hi,

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.

 

Thanks,

Waleed bin Afzal.

Categories:
I have the same question (0)
  • Verified answer
    RobElliott Profile Picture
    10,416 Super User 2026 Season 1 on at

    Hi @WaleedBinAfzal , you need to have a couple of Compose controls, one to get today's date in the date format you want, and the second to calculate 7 days ago in the same date format. Then you have a Condition control: if SubmittedDate is greater than or equal to the output of 7 days ago AND Submitted date is less than or equal to the output of the Today compose then.....

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

     

    1-Compose controls and expression1-Compose controls and expression2-Condition2-Condition

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard