cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

power automate condition function to compare date

hi,

 

i found some bugs over the comparing the date.

the flow i constructed in such a way where i would like to send an email one day after the event.

utcnow is greater than reformat date (i just change the event date format from dd-MMM-yyyy to MM/dd/yyyy),

 

i found out that the comparison is valid only where the date to be compared is within 2019 or before 2019.

if compare, on 2020, then the comparison is invalid or wrong.

 

lets say, utcnow is 26-dec-2019

if i compare the event date which 10-dec-2019, the comparison of (utcnow is greater than event date) is valid correct. 

it is true that 26-dec-2019 is greater than 10-dec-2019.

 

however, if i compare the event date which is 1-Jan-2020, then the comparison is wrong.

in the power automate, it assume it is correct. 

however, in fact, 26-dec-2019 is not greater than 1-jan-2020.

 

so, can anyone guide me, where did i do wrong??

 

here, i attach photo for your better understanding.

 

flow photo 2.pngflow photo 1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @AceWong,

 

Please change the format of the date into "yyyy-MM-dd" and then compare it, because the compare should according to timestamp order.

 

If 26-dec-2019 compare with 10-dec-2019, it will compare the 26 with 10 firstly, so 26-dec-2019 will greater than 10-dec-2019.

 

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

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @AceWong,

 

Please change the format of the date into "yyyy-MM-dd" and then compare it, because the compare should according to timestamp order.

 

If 26-dec-2019 compare with 10-dec-2019, it will compare the 26 with 10 firstly, so 26-dec-2019 will greater than 10-dec-2019.

 

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

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (51,218)