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

Flow - Condition: if Today is Wednesday then do ...

Hello all,

 

I'm currently struggling a bit with the following:

 

In my condition I would like to have the following condition:

If "DayOfWeek equals Wednesday" (= 3 I assume?) then "enter the $true part of the condition".

Not sure if this information is needed, but I'm on GMT +1 time zone.

 

I've been trying a few options, but none of them seem to work.

I tried to make a variable using "Compose" with expressions:

- DayOfTheWeek()

- DayOfTheWeek(UtcNow())

- DayOfTheWeek(ConvertFromUtc(UtcNow(),'GMT+1')

- ...

To then use that variable in my condition.

 

Can anyone assist me with this? I assume this should be a pretty simple one to do, but just can't seem to figure it out...

 

Kind regards,

Nicolai

 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @NicolaiS 

The expression is called 

 

dayOfWeek(utcNow())
 
Not DayOftheWeek.
 
Thanks


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

Hi @NicolaiS 

The expression is called 

 

dayOfWeek(utcNow())
 
Not DayOftheWeek.
 
Thanks


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

rohentz
Microsoft
Microsoft

Hi @NicolaiS how are you doing today?

 

Please, take a look on this sample on the use of the function dayOfWeek

 

15.jpg

 I think tahat you you can test the output of the variable on a condition to do you process. 

 

Also, follow a documentation for date and time functions https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#d...

 

Thanks to use our community and let me know if you have doubts about the solution provided

 

Regards

 

Rodrigo Hentz

Microsoft Support Engineer

NicolaiS
Frequent Visitor

Yes, that was a typo on my end, sorry.

I've been using DayOfWeek, not DayOfTheWeek.

 

For some strange reason, I've been trying DayOfWeek(UctNow(()), but the syntax wouldn't accept the "UtcNow()" in the expression when clicking "Update".

 

However, just tried it again, tested the flow and got the correct number for this current day.

No idea what went wrong last time, as this was the first expression I tried here.

 

Thanks for the help.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,376)