cancel
Showing results for
Did you mean:
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

Condition compares these 2 dates:

Output 1)

Output 2)

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.

Do you have ANY IDEA why???

1 ACCEPTED SOLUTION

Accepted Solutions
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!

Power Automate Video Tutorials
3 REPLIES 3
Continued Contributor

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'))

Thanks
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!

Power Automate Video Tutorials
Frequent Visitor

@abm Thank you, your solution worked!

I never worked with ticks, and trying to avoid.

Announcements

#### Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.  Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash  ScottShearer     Rusk  ChristianAbata     cchannon  Koen5     a33ik  Heartholme     AaronKnox  okeks      Matren   David_MA     Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg    rubin_boer   cwebb365   Dorrinda   G1124   Gabibalaban   Manan-Malhotra   jcfDaniel   WarrenBelz   Waegemma   drrickryp   GuidoPreite    If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated.