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

Condition not working properly in date

Hi Everyone,

 

When comparing the 01/07/2022 is greater than 10/01/2021 the answer is false. It is supposed to be true.

Why is the answer is false?  Here's the output below.

Boynogs123_1-1642661345522.png

 

Boynogs123_0-1642661315855.png

 

Thank you in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Boynogs123  it is two string you compare, and both are of the same length hence the false

 

try  comparing

ticks(formatDateTime(variables('varDateOne'),'M/d/yyy'))

ticks(formatDateTime(variables('varDateTwo'),'M/d/yyy'))
rubin_boer_2-1642706678788.png

 

Result (true)

rubin_boer_3-1642706728671.png

 

changing varDdateOne

rubin_boer_4-1642706789492.png

 

Hope it helps

 

 

 

View solution in original post

2 REPLIES 2
rubin_boer
Super User
Super User

hi @Boynogs123  it is two string you compare, and both are of the same length hence the false

 

try  comparing

ticks(formatDateTime(variables('varDateOne'),'M/d/yyy'))

ticks(formatDateTime(variables('varDateTwo'),'M/d/yyy'))
rubin_boer_2-1642706678788.png

 

Result (true)

rubin_boer_3-1642706728671.png

 

changing varDdateOne

rubin_boer_4-1642706789492.png

 

Hope it helps

 

 

 

Boynogs123
Frequent Visitor

Thank you @rubin_boer !

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,644)