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 Apps / Set default date for D...
Power Apps
Answered

Set default date for DatePicker depending on business hours

(0) ShareShare
ReportReport
Posted on by 8

Hi,

Building my first powerapp here (wish me luck). Something that I want to include is to set the default date on the DatePicker so it defaults to Today() unless:

The user is trying to place an order after 4:30 pm on weekdays then it defaults to next day, also to default to Monday after 11:30am Saturday or all day Sunday.

 

Greatly appreciate your help.

 

 

  

Categories:
  • Verified answer
    Dant7484 Profile Picture
    154 on at

    Hi,

    I think this will work for you : 

    Switch(
    Weekday(Now()),
    1, Now() + 1, //Sunday
    7, If(
    Hour(Now()) > 11,
    If(
    Minute(Now()) > 30,
    Now() + 2
    ),
    Now()
    ), //Saturday
    If(
    Hour(Now()) > 16,
    If(
    Minute(Now()) > 30,
    Now() + 1
    ),
    Now()
    ) //Rest of work days
    )

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 Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard