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

Notifications

Announcements

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard