web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / A Condition action tha...
Power Automate
Answered

A Condition action that determines if it is currently Tuesday - Sunday

(0) ShareShare
ReportReport
Posted on by 76

Hi,

 

Is it possible to make a condition statement that returns true if the date is currently between Tuesday, 12:00pm and Sunday, 12:00am?

 

Thanks

Categories:
  • Verified answer
    v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @MFEProjects ,

    Please try:

    and(
    greaterOrEquals(dayOfWeek(outputs('formate_date_time')),2),
    lessOrEquals(dayOfWeek(outputs('formate_date_time')),7),if(equals(dayOfWeek(outputs('formate_date_time')),2),greater(formatDateTime(outputs('formate_date_time'),'hh:mm'),'24:00')
    ,if(equals(dayOfWeek(outputs('formate_date_time')),7),less(formatDateTime(outputs('formate_date_time'),'hh:mm'),'12:00'),true))
    )
     
    outputs('formate_date_time')  : datetime
     

    Best Regards

    Cheng Feng

     

  • MFEProjects Profile Picture
    76 on at

    Hi @v-chengfen-msft 

     

    I wasn't able to get this to format correctly. What type of action is format_date_time? Is it a Convert Time Zone?

     

    Thanks for the reply

  • MFEProjects Profile Picture
    76 on at

    Thanks, I was able to get this to work. I needed to swap the 2 and the 7 though so the range was correct.

    Appreciate the help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard