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 / Compare date to future...
Power Automate
Unanswered

Compare date to future date

(0) ShareShare
ReportReport
Posted on by 25

Hi,

 

I'm trying to iterate through a sharepoint list, which has date value.

 

Each week the flow will run, and will compare each date value to see if it falls within the next week.

If it does, it should return true

If not, returns false

 

I've been trying to use conditions, comparing the

date of input --> formatDateTime(addDays(utcNow(), +77), 'MM/dd/yyyy')

But all that returns is false.

 

Thanks!

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Tielure1 

     

    Can you share a screenshot of the flow? Can you confirm that the date format of the sharepoint column is MM/dd/yyyy?

    Also, you might want to remove 77 and add 7 in the formula: formatDateTime(addDays(utcNow(), 7), 'MM/dd/yyyy') (also remove the + sign. only - sign is needed when you are substracting days). 

     

    Can you check and confirm the above?

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Tielure1 Profile Picture
    25 on at

     

    Annotation 2019-10-07 131153.png

     

    The format in the sharepoint is in the format of MM/dd/yyyy

    The +77 is a formatting error on my end. The forumla I used did use +7.

     

     

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Tielure1 

     

    As you are filtering the records you can use ODATA filter query and get rid of the condition:rrr4.PNG

    Here, DateTime is the name of the date column in my SP list, and le is less than or equal to and then in the single quotes, i am adding the expression: 

    formatDateTime(adddays(utcNow(),7),'MM/dd/yyyy')

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

  • Tielure1 Profile Picture
    25 on at

    3.png

    This is what occurs when I put in the formula

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Tielure1 

     

    Can you share a screenshot of the action in edit mode? (where i can see the filter query?)

     

    You just have to provide the column name on the left side. And can you check the formula too?

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Tielure1 Profile Picture
    25 on at

     

    4.png

     

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Tielure1 

     

    You are referring to a particular date by selecting the column from the attribute in the dynamic selector. Can you remove that column name from there and simply in plain text type DateofEvent and check if you continue to face the issue?

     

    If this does not work, you can also try the column name as Date_x0200_of_x0200_Event and check if it works. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Tielure1 Profile Picture
    25 on at

    Date_x0200_of_x0200_Event, doesn't work and neither does DateOfEvent?

     

    DateOfEvent Returns

    "Column 'DateOfEvent' does not exist
     
    And Date_x0200_of_x0200_Event Returns
    Column 'Date_x0200_Of_x0200_Event' does not exist
     
    The column is definitely called Date Of Event!
     
     
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Tielure1 

     

    My bad. Space needs to be replaced with _x0020_

    Please update as Date_x0020_of_x0020_Event and try again. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Tielure1 Profile Picture
    25 on at

    Thank you so much!

    It works now 🙂

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