cancel
Showing results for
Did you mean:

## Problem with a date control

Hi,

I'm having some problem with my date check/control in my flow and it worked before I split up my form into 3 different sections (branching).

Now it gives me false positive.

I need it do check if the dates entered aren't entered wrong (e.x in the past or the ToDate greater than the FromDate).

I have a from i Froms that have 4 dates values:

• FromDateA - rde93b0d1e48845e29df431fcb653120a
• ToDateA - r65eff20ea9fc4e1fb5d03af1ae2195d5
• FromDateB - r8b6a7de6dad24e628d24a678ee4b6f92
• ToDateB - rf1410ece5b40432caaa1b68dfd7fcb80

And here is my Flow:

And here is the false positive:

Any idés?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi again @v-bacao-msft and @ManishJain!

I found the problem.

I don't know how it worked before and I must have been blind and got a brain freeze 😅

I had the wrong "check" in the Condition. It should (of course) be "Less or equal to".

Corrent: "FromDate is less than or equal to ToDate"

Wrong: "FromDate is greater than or equal to ToDate"

Thank you both!

8 REPLIES 8
Solution Sage

Hi Zowie,

Is it right that you are comparing string dates and not actual dates from the second screenshot . I think you should visit this link if it helps you:

https://powerusers.microsoft.com/t5/Building-Flows/Compare-dates/td-p/54802

Thanks

Hi @ManishJain,

I'm not sure that I understand you reply and the link correctly 😅 but the dates from From isn't a string? So I need to convert the date to a string?

It worked before when I only had one FromDate and ToDate. But not now when I have two of them

Solution Sage

Hi @ZowieS ,

What I meant by that was if the data is in date format or string. In the second screenshot you provided the response was in string. So I thought of confirming. The link provided gives you option to convert your dates into correct format first and then compare. Please follow link till the end .

Thanks

Hi @ManishJain,

I think the Date is in a String fotmat from MS From base on my testing before I added two different FromDate and ToDate

Please see where I hover over one of the From value:

And if I remove one group it will work for that part of the form that is in the Condition.

Ex: If I remove the group that contain FromDateA and ToDateA.
Only the results from the form that uses FromDateB and ToDateB will get checked correctly.

Solution Sage

Hi @ZowieS ,

Please refer to this link as well , it also talks about using ticks

https://sharepains.com/2018/11/02/microsoft-flow-compare-dates-using-conditions-in-the-sharepoint-co...

Thanks

Community Support

Hi @ZowieS ,

For comparing the date and troubleshooting easily, please consider filling the date in Compose and configure the output of Compose in Condition to compare the date.

Best Regards,

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

Hi @v-bacao-msftand @ManishJain ,

Thank you both for your help with this! 👍❤️

I was just looking for that so thanks a lot!

Sadly it didn't work with "Compose".

This is the flow:

(Note: In the parentheses "()" contains the 3 last characters of the ID corresponding to FromDate and ToDate

And here is the result:

I want the Result in "Condition" (picture above) to be false.

I think the problem is in the Condition but I have tried different solutions but still got the wrong result.

Hi again @v-bacao-msft and @ManishJain!

I found the problem.

I don't know how it worked before and I must have been blind and got a brain freeze 😅

I had the wrong "check" in the Condition. It should (of course) be "Less or equal to".

Corrent: "FromDate is less than or equal to ToDate"

Wrong: "FromDate is greater than or equal to ToDate"

Thank you both!

Announcements

#### Celebrating a New Season of Super Users with Charles Lamanna, CVP Microsoft Business Applications

February 8 was the kickoff to the 2024 Season One Super User program for Power Platform Communities, and we are thrilled to welcome back so many returning Super Users--as well as so many brand new Super Users who started their journey last fall. Our Community Super Users are the true heroes, answering questions, providing solutions, filtering spam, and so much more. The impact they make on the Communities each day is significant, and we wanted to do something special to welcome them at our first kickoff meeting of the year.   Charles Lamanna, Microsoft CVP of Business Applications, has stressed frequently how valuable our Community is to the growth and potential of Power Platform, and we are honored to share this message from him to our 2024 Season One Super Users--as well as anyone who might be interested in joining this elite group of Community members.     If you want to know more about Super Users, check out these posts for more information today:    Power Apps: What is A Super User? - Power Platform CommunityPower Automate: What is A Super User? - Power Platform Community Copilot Studio: What is A Super User? - Power Platform Community Power Pages: What is A Super User? - Power Platform Community

#### February 2024 User Group Update: Welcoming New Groups and Highlighting Upcoming Events

It's a new month and a brand-new year, which means another opportunity to celebrate our amazing User Groups!Each month, we highlight the new User Groups that have joined the community. It's been a busy season for new groups, because we are thrilled to welcome 15 New User Groups! Take a look at the list below, shared by the different community categories. If your group is listed here, give this post a kudo so we can celebrate with you!   We love our User Groups and the difference they make in the lives of our Community! Thank you to all the new User Groups, new User Group leaders--we look forward to hearing about your successes and the impact you will leave!   In addition to our monthly User Group spotlight, it's a great time to share some of the latest events happening in our User Group community! Take a look at the list below to find one that fits your schedule and need! There's a great combination of in-person and virtual events to choose from. Also, don't forget to review the many events happening near you or virtually! It's a great time of year to connect and engage with User Groups both locally and online. Please Welcome Our NEW User Groups   Power Platform: Heathcare Power Platform User Group Power Platform Connect Hub Power Platform Usergroup Denmark Mexico Norte- Power Platform User Group Pune Power User Group Sudbury Power Platform User GroupMicrosoft User Group GhanaMPPBLR - Microsoft Power Platform Bengaluru User Group Power Apps:   Myrtle Beach Power Platform User GroupAnanseTechWB PowerApps Copilot Studio: Pathfinders Power Platform Community Dynamics365: Cairo, Egypt MSD 365 Business Central/NAV/F&O User GruopMS Dynamics 365 Business Central LatamCincinnati OH D365 F&O User Group February User Group Events February 2024 Cleveland Power Platform User GroupPortallunsj - Februar 2024Indiana D365/AX February User Group MeetingQ1 2024 KC Power Platform and Dynamics 365 CRM Users Group