
Announcements
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.
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
)