
Announcements
Dear All
I am New to Office 365 as a Admin. i am trying to make a Flow so i can sent out of hour replies between 8 pm to 8 am Monday to Friday and all day Saturday and Sunday.
I have looked here and found this one
@or(
equals(
dayofweek(
UtcNow()
),
0),
equals(
dayofweek(
UtcNow()
),
6),
less(
formatDateTime(
addHours(
triggerBody()?['DateTimeReceived'],-6
),
'HH:mm'
),
formatDateTime('08:00:00','HH:mm')
),
greater(
formatDateTime(
addHours(
triggerBody()?['DateTimeReceived'],-6
),
'HH:mm'
),
formatDateTime('20:00:00','HH:mm')
)
)This one does seem to always go to yes after this condition no matter what date or time tested.
Any help would be great
Step by step would be better
Hi @Office365newbie,
Could you please share a screenshot of your flow’s configuration?
Further, could you please explain a bit more about addHours() function in your formula that you provided?
I have made a test on my side and the flow works well. My flow’s configuration as below:
On my side, within Condition 2 box, click “Edit in advanced mode”, type the following formula for test:
@or(equals(dayOfWeek(utcNow()),0),equals(dayOfWeek(utcNow()),6), less(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],3),'HH:mm'),formatDateTime('08:00:00','HH:mm')),greater(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],3),'HH:mm'),formatDateTime('20:00:00','HH:mm')))
The flow works successfully as below:
Please take a try to check if the syntax within your formula is correct. Besides, please check if the test date or time that you provided all satisfy the condition, if yes, please take a try to test a date or time which is not between 8 pm to 8 am Monday to Friday and all day Saturday and Sunday.
Best regards,
Kris