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 III
Super User III

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 blogPower 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 III
Super User III

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 blogPower Automate Video Tutorials

View solution in original post

ElaK
Frequent Visitor

@abm Thank you, your solution worked!

I never worked with ticks, and trying to avoid.

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (30,965)