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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Conditional process ba...
Power Automate
Unanswered

Conditional process based on a date enter into a form

(0) ShareShare
ReportReport
Posted on by

Hello all, I am trying to figure out a flow process, here is the flow I am trying to make. 

 

Step 1- Staff member submits a MS form which has a date selection for a due date

Step 2- Flow determines if the due date is more or less than 30 days from current date

Step 3- If more than 30 days, assigns it to one planner and if less than 30 days, assigns it to a different planner

 

How would I be able to have a condition decide which path to take based on how many days the due date is from current date? I have tried date difference expression, format time, and add time and it does not seem to work. Please let me know if there is more information needed. 

Categories:
I have the same question (0)
  • nichtaurelius Profile Picture
    50 on at

    Hi John,

    In your case, you'll need to calculate the time difference between the due date and the current time. To achieve this, you should start by converting both the due date and the current time into ticks. After obtaining these tick values, subtract the due time ticks from the current time ticks. Next, convert the resulting ticks into days using the div function. The following expression accomplishes this and provides the time difference in days:


    div(sub(ticks(variables('DueDate')), ticks(utcNow())), 864000000000)

     

    Now, you can use this expression in a condition and check if the time difference is less than 30 days. 

    nichtaurelius_0-1697026483976.png

    Please note that you need to change the "variables('DueDate')" in your flow for your due date 😉

    I hope this helps in resolving your issue.

    Greetings,


    Aurelius 🙂

  • MarkRahn Profile Picture
    1,229 Super User 2025 Season 2 on at

    @nichtaurelius great answer!

     

    I was just working thru this myself and saw you had posted the correct solution.

     

    div(sub(ticks(body('Get_response_details')?['r8529929812034b3ab5084f47b24f7b6a']),ticks(utcNow())),864000000000)

     

    -Mark

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard