cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Compare date to future date

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!

2 ACCEPTED SOLUTIONS

Accepted Solutions

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!

 

 

View solution in original post

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!

View solution in original post

10 REPLIES 10
Dual Super User II
Dual Super User II

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!

 

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.

 

 

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!

 

 

View solution in original post

3.png

This is what occurs when I put in the formula

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!

 

4.png

 

 

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!

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!
 
 

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!

View solution in original post

Thank you so much!

It works now 🙂

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (99,647)