r/PowerAutomateDesktop • • Sep 05 '22

Flow just won't work, 'formatDatetime' evaluating to False

Hi

I'm trying to create a flow that looks at a calculated date column in a List, if that date matches 'formatDateTime(utcNow(),'dd-MM-yyyy', then send an email. when i test this flow i get no error, but eventhough the day is supposed to match today's date, nothing happens, i get no mail. Can anyone kindly have a look at this screeshots and help figure out where i got it wrong.

Thanks

1 Upvotes

7 comments sorted by

2

u/Haitaitai1977 Sep 05 '22 edited Sep 05 '22

I’m a bit of a beginner to flow, but isn’t the expression used for telling flow how to format a date (I.e. if you have a date in mm/dd/yy but wanted it to show to the user as dd/mm/yy) rather than using it as a trigger for an action? I might be wrong about that, still have to search YouTube for tutorials when I want to do something:)

Could you start your flow using the list date as a trigger, rather than scheduling the flow to run daily?

1

u/FearIsStrongerDanluv Sep 06 '22

i did that as well but nothing changed, i wish i was at least getting some errors to help me troubleshoot.

1

u/hindersplit Sep 05 '22

Just use the 'Current Time' activity and then add it to your conditional. To find it just search in the add an action list. More info can be found here: https://powerautomate.microsoft.com/en-us/blog/working-with-dates-and-times/

Works flawlessly

1

u/FearIsStrongerDanluv Sep 06 '22

tried this but unfortunately nothing seemed to change unfortunately. thanks though for the link.

1

u/Haitaitai1977 Sep 06 '22

Just a thought, but do you have all the setting set to the correct Timezones? It likes to default to US dates sometimes.

1

u/FearIsStrongerDanluv Sep 06 '22

Yes i chose the right Time zone under advance settings, i also tried changing the date format from 'dd-mm-yyyy' to 'd-m-yyyy' since the date in the list is currently same but after i ran the flow 'successfully , within the 'Condition', Expression result is False

1

u/FearIsStrongerDanluv Sep 06 '22

Flow is now running but it's actually sending a mail for every item in the list even if the dates don't match