cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Compare the current date with an date from an excel field

Hello,

 

I have a condition in my flow where i check if the current date is later then a date written in an excel field:

 

utc Now('dd.MM.yyyy') is bigger than the excel field. But it wont work. Do somebody know how to solve? Is it maybe because of the dots in the format?

 

Because I want to check, if the current date is later, than create an e-mail and inform that person to do his task.

1 ACCEPTED SOLUTION

Accepted Solutions

try to do this. Before your compare condition
Initialize two variables string type.
1) First variable should store the utcNow() expression
2) Second variable should store the value from from Excel.

In your compare statement use the variables.

If this still doesnt work. Please go to the run hsitory of the flow and take screenshot of both the variables (in run mode not in edit mode)

 

I just did a quick test and it works.

condition.PNGdt.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

 

 

View solution in original post

8 REPLIES 8
Rahber
Solution Sage
Solution Sage

Are you using Excel Online or Excel?

In Excel Online the dates are returned as Integers.

You can read about the workaround here: https://powerusers.microsoft.com/t5/Building-Flows/Excel-dates-turned-into-integers/m-p/594719/highl...
Anonymous
Not applicable

Is there an optin to solve that with excel online, as i used that for my whole big process and it would cost time to change that into the regular excel. Maybe to change the formate with excel online ?

Hello,

Can you please show a screenshot from your Flow Previous Run where you are comparing the two fields.

I just want to see what date type is being returned from Excel then i can tell you exact change that needs to be done in Flow.

@Anonymous 

Try formatting the column where your date is stored in Excel as a string/text.  You'll need to use formatDateTime on either the date returned from utcNow() or Excel to put them in the same format.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

My flow is an recurrence flow that is supposed to work each day. My flow have the following condition. Sorry its in german but i translate.  The condition has to check the current date and look if it is bigger so like (Today is 27.06.2020 and compare that with the excel field 26.06.2020). The excel field is a standard field in excel online. And the flow continue if it is bigger, than send an email. Hope that helps?

MarvinBier_0-1593286384931.png

 

 

MarvinBier_1-1593286409173.png

 

Anonymous
Not applicable

Actually both fields are the same, as i now compare two excel fields. Because in the step before i store the current date in a field and then compare both. But i dont even konw if the condition can handle to look which date is later like 28.06.2020 and 25.06.2020. Is this possible to check?

 

MarvinBier_0-1593344404597.png

 

 

try to do this. Before your compare condition
Initialize two variables string type.
1) First variable should store the utcNow() expression
2) Second variable should store the value from from Excel.

In your compare statement use the variables.

If this still doesnt work. Please go to the run hsitory of the flow and take screenshot of both the variables (in run mode not in edit mode)

 

I just did a quick test and it works.

condition.PNGdt.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

 

 

The Excel Get a Row action now has a DateTime Format input that allows you to specify the way dates are returned from Excel. This would eliminate the need of having to add days to the beginning of time just to be able to compare a date with today. 

JacquesOlivier_0-1626335057331.png

Returns the date as

JacquesOlivier_1-1626335507748.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (3,365)