Introduction

Date and weekday logic is common in Power Apps—for example, restricting actions to business days, validating selected dates, disabling buttons on weekends, or controlling booking and approval processes.

The Today() and Weekday() functions make these scenarios simple and readable. Microsoft documents Today() as returning the current date, while Weekday() returns a number representing the day of the week.

Date

1. Understanding Today()

The Today() function returns the current date. Unlike Now(), it doesn't include a meaningful current time; the time portion is midnight. It uses the current user's local time.

Basic formula

Code
Today()

Example:

Code
28-Aug-2026

To display the date in a specific format:

Code
Text(Today(), "dd-mmm-yyyy")

Result:

Code
28-Aug-2026

When to use Today()

Common scenarios include:

  • Checking whether something is due today

  • Comparing dates

  • Validating selected dates

  • Calculating business days

  • Restricting transactions based on the current date

2. Understanding Weekday()

Weekday() returns a number representing the day of the week.

By default, Sunday is 1 and Saturday is 7.

Code
Weekday(Today())

Number

Day

1

Sunday

2

Monday

3

Tuesday

4

Wednesday

5

Thursday

6

Friday

7

Saturday

For example, if today is Friday:

Code
Weekday(Today())

returns:

Code
6

3. Common Business-Day Checks

Check if today is Saturday or Sunday

Code
Weekday(Today()) = 1 ||
Weekday(Today()) = 7

This returns true on Saturday or Sunday.

Check if today is Monday–Friday

Code
Weekday(Today()) >= 2 &&
Weekday(Today()) <= 6

This returns true for weekdays.

Allow only Tuesday and Wednesday

Code
Weekday(Today()) = 3 ||
Weekday(Today()) = 4

Tuesday = 3
Wednesday = 4

4. Working with a Date Picker

The same logic can be applied to a selected date instead of today's date.

For example:

Code
Weekday(DatePicker1.SelectedDate) = 3 ||
Weekday(DatePicker1.SelectedDate) = 4

This allows only Tuesday and Wednesday.

Allow Monday–Friday

Code
Weekday(DatePicker1.SelectedDate) >= 2 &&
Weekday(DatePicker1.SelectedDate) <= 6

This is useful for:

  • Appointment dates

  • Leave requests

  • Invoice processing dates

  • Delivery dates

  • Booking forms

  • Approval dates

5. Disable a Button on Weekends

You can use the logic directly in a Button's DisplayMode property.

Code
If(
    Weekday(Today()) = 1 ||
    Weekday(Today()) = 7,
    DisplayMode.Disabled,
    DisplayMode.Edit
)

Result

Day

Button

Sunday

Disabled

Monday

Enabled

Tuesday

Enabled

Wednesday

Enabled

Thursday

Enabled

Friday

Enabled

Saturday

Disabled

This is particularly useful when an action should only be performed during business days.

For business applications, I recommend using:

Code
Weekday(Today(), StartOfWeek.Monday)

With Monday as the first day:

Number

Day

1

Monday

2

Tuesday

3

Wednesday

4

Thursday

5

Friday

6

Saturday

7

Sunday

Power Fx supports StartOfWeek.Monday and other StartOfWeek options for Weekday().

Check for weekdays

Now the formula becomes much easier:

Code
Weekday(
    Today(),
    StartOfWeek.Monday
) <= 5

Check for weekend

Code
Weekday(
    Today(),
    StartOfWeek.Monday
) > 5

This is my preferred approach for most business applications because the logic maps naturally to Monday = 1 through Friday = 5.

7. Useful Power Apps Patterns

Allow only Monday–Friday

Code
Weekday(
    DatePicker1.SelectedDate,
    StartOfWeek.Monday
) <= 5

Allow only Tuesday and Wednesday

Code
Weekday(
    DatePicker1.SelectedDate,
    StartOfWeek.Monday
) in [2, 3]

Allow only Monday and Tuesday

Code
Weekday(
    DatePicker1.SelectedDate,
    StartOfWeek.Monday
) in [1, 2]

Check weekend

Code
Weekday(
    DatePicker1.SelectedDate,
    StartOfWeek.Monday
) > 5

Display the selected day name

Code
Text(
    DatePicker1.SelectedDate,
    "dddd"
)

Example result:

Code
Friday

8. Practical Example: Invoice Approval

Suppose an Invoice Approval button should only work Monday–Friday.

Set the button's DisplayMode to:

Code
If(
    Weekday(Today(), StartOfWeek.Monday) > 5,
    DisplayMode.Disabled,
    DisplayMode.Edit
)

You can also combine this with your existing approval conditions:

Code
If(
    SelectedTask.Status.Value <> "Pending" ||
    Weekday(Today(), StartOfWeek.Monday) > 5,
    DisplayMode.Disabled,
    DisplayMode.Edit
)

Now the button is enabled only when:

  1. The task is pending.

  2. Today is Monday–Friday.

9. Practical Example: Date Picker Validation

Suppose users should not select a weekend date.

Use the Date Picker's validation logic:

Code
If(
    Weekday(
        DatePicker1.SelectedDate,
        StartOfWeek.Monday
    ) > 5,
    Notify(
        "Please select a business day.",
        NotificationType.Warning
    )
)

This prevents users from selecting Saturday or Sunday for business transactions.

10. Today() vs Now()

A common question is when to use each function.

Function

Returns

Example

Today()

Current date

28-Aug-2026

Now()

Current date + time

28-Aug-2026 10:30 AM

Weekday()

Day-of-week number

6 for Friday

Microsoft notes that Today() and Now() use the current user's local time.

Best Practice

For most business applications, use:

Code
Weekday(
    DatePicker1.SelectedDate,
    StartOfWeek.Monday
)

instead of relying on the default Sunday-based numbering.

It makes formulas much easier to understand:

Code
<= 5

means Monday–Friday

Code
> 5

means Saturday–Sunday

And:

Code
in [2, 3]

means Tuesday–Wednesday.

Conclusion

Today() and Weekday() are small Power Fx functions, but they are extremely useful for implementing real-world business rules.

They can be used for:

  • 📅 Date validation

  • 🗓️ Business-day restrictions

  • 🚫 Weekend blocking

  • ✅ Approval rules

  • 📦 Delivery-date validation

  • 🧾 Invoice processing

  • 📆 Appointment scheduling

  • 🔄 Workflow conditions

For business apps, combining Weekday() with StartOfWeek.Monday generally produces the clearest formulas.