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

condition if an action is late is returning false result, but should be true

I have this condition in my flow. Up until now, it worked correctly. It even worked correctly an hour ago, and then it didn't. I am running out of ideas what could have gone wrong and why it is returning false result

 

ElaK_0-1609798736663.jpeg

Condition compares these 2 dates:

Output 1)

ElaK_1-1609798880484.jpeg

Output 2)

 

ElaK_2-1609798910343.jpeg

 

If Output 1) is less than Output 2), then condition should be "true"- meaning- YES, the submission is late

In this case Output1) 11/27/20, and Output2) 1/4/21, so 11/27/20<1/4/21, hence the condition is TRUE, but the result comes back as FALSE.

 

ElaK_3-1609799185879.jpeg

 

Do you have ANY IDEA why???

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @ElaK 

 

You can compare the dates always using yyyyMMdd format and returned as an integer.

 

Try using

 

formatDateTime('yourdate''yyyyMMdd'

 

So in your case 11/27/20<1/4/21

 

11/27/20 will return as 20201127 integer

1/4/21 will return as 20210401 integer

 

So always 2021127 < 20210401

 

 

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

3 REPLIES 3
sakula1996
Responsive Resident
Responsive Resident

Hi @ElaK ,

 

Try converting it to ticks(100 nanoseconds interval):

ticks(formatDateTime('11/27/20''MM-dd-yyyy'))
ticks(formatDateTime('10/27/21''MM-dd-yyyy')) 
 
Image 7.png
 
Thanks
abm
Super User
Super User

Hi @ElaK 

 

You can compare the dates always using yyyyMMdd format and returned as an integer.

 

Try using

 

formatDateTime('yourdate''yyyyMMdd'

 

So in your case 11/27/20<1/4/21

 

11/27/20 will return as 20201127 integer

1/4/21 will return as 20210401 integer

 

So always 2021127 < 20210401

 

 

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
ElaK
Frequent Visitor

@abm Thank you, your solution worked!

I never worked with ticks, and trying to avoid.

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,865)