Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Get DayOfWeek from DateTimeReceived when new emails arrives

Hi All,


Anyone can help me on below?


I want to set a condition where 

if DateTimeReceived is equal to 6 (or Saturday)

Forward email to specified email address. 


How should i set the if DateTimeReceived is equal to 6 (or Saturday)?


i try with 



but return this is not valid expression.


Many thanks for your help on this, it is much appreciated. I am not clear as to what the Compose formula should be. Below is the original formula, that returned (3):


dayOfWeek(formatDateTime(triggerbody() ['cr0ad_referraldate'],'D'))


The following if the revised Compose formula (I have changed the Referral Date to Friday's date in the Case):


dayOfWeek(formatDateTime(triggerbody() ['cr0ad_referraldate'],'dddd'))


This formula is returning an error message:


Compose Failed.PNG


Have I got the Compose expression wrong?


Also, what should the condition expression be, once the Compose function returns the alphabetic value for day of the week?

Output Condition.PNG


If you want the name of the day as output then you don't need the DayOfTheWeek() function around the outside anymore.  DayOfTheWeek() returns the number of the day, but you want the name.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Many thanks on this. I have it working correctly now.

Have a good weekend.


Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,071)