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 / Trying to do a conditi...
Power Automate
Unanswered

Trying to do a condition based on date

(0) ShareShare
ReportReport
Posted on by 11

I am trying to create a simple condition that does things different depending on the date submitted (field in SharePont) + 5 days.  I would rather do business days, but that looks far more complex to calculate.  The condition that I have setup that isn't working is:

 

Expected Date (field in SharePoint list)

Is less than (condition)

formatDateTime(addDays(utcNow(), +5), 'MM/dd/yyyy') (expression)
 
Everything I route through this formula no matter what the date is, is that it is not less than or equal to 5 days.  Unfortunately since SharePoint doesn't seem to do previews of expressions to see what they are calculating, I can't really tell the issue.
Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @DCurzio

     

    Are you formatting the expected date in the format?

     

    If you want to see the format expression value then add a compose step and set the expression formatDateTime(addDays(utcNow(), +5), 'MM/dd/yyyy'). Use the compose output to compare the value against the expected date. This way you can see the runtime values from the run history.

     

  • v-litu-msft Profile Picture
    on at

    Hi @DCurzio,

     

    The date column format in the SharePoint is 'yyyy-MM-dd', so when comparing it with the utcNow + 5 days, the formate fuction should input 'yyyy-MM-dd', please follow as blew shows, use the formatDateTime(addDays(utcNow(), +5), 'yyyy-MM-dd') instead of formatDateTime(addDays(utcNow(), +5), 'MM/dd/yyyy').Annotation 2019-10-23 152804.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-litu-msft Profile Picture
    on at

    Hi @DCurzio,

     

    Has your problem been solved?
    If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

    Best Regards,
    Community Support Team _ Lin Tu

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard