You build a simple leave request Canvas app for an HR team. An employee selects a date, but you need to stop them from requesting leave on Saturday or Sunday. Then Power Apps suddenly shows: “Can’t convert this data type. Power Apps can’t convert this Date to a Boolean.”
I have seen this issue when a formula mixes a date value, a collection, and a condition without matching their data types. The fix is straightforward once you understand what the formula expects. This troubleshooting guide shows why the error happens and how to validate weekday selections correctly.

Power Apps Can’t Convert This Data Type Error
The error appears when Power Apps expects a Boolean value—either true or false—but receives a Date value instead.
In this example, add a Date Picker control named BusinessDay_DatePicker and a Button control. The user selects a business date from the Date Picker, while the button creates a collection used in validation.
Use the following formula in the Button’s OnSelect property:
Collect(
Collweekend,
Weekday(BusinessDay_DatePicker.SelectedDate) = 1 Or 7
)

Here is what each part means:
- Collweekend is the collection name.
- Weekday() returns a number for the selected day. By default, Sunday is 1 and Saturday is 7.
- BusinessDay_DatePicker.SelectedDate returns the date selected in the Date Picker.
= 1 Or 7attempts to identify Sunday or Saturday.
The problem becomes visible when you use the following formula in the Button’s DisplayMode property:
If(
BusinessDay_DatePicker.SelectedDate in Collweekend,
DisplayMode.Disabled,
DisplayMode.Edit
)

This formula compares a Date with records stored in a collection. Power Apps cannot convert that date comparison into the true/false result needed by DisplayMode, so it raises the conversion error.
For a closer look at working with date controls, read this guide on the Power Apps Date Picker.
Fix the Power Apps Can’t Convert This Data Type Error
The best approach is to create a collection that stores weekday numbers in a clearly named column. This makes the comparison predictable and easier to maintain.
Create the Weekday Collection
Select the Button, rename it to btnCreateCollection, and add this formula to its OnSelect property:
Collect(
Collweekend,
{WeekDays: "2"},
{WeekDays: "3"},
{WeekDays: "4"},
{WeekDays: "5"},
{WeekDays: "6"}
)

This creates a collection named Collweekend with one column, WeekDays. The values 2 through 6 represent Monday through Friday when Sunday is the first day of the week.
The collection holds text values, so convert the Weekday() result to text before testing it. Use this formula in the OnSelect property of BusinessDay_DatePicker:
If(
Text(Weekday(BusinessDay_DatePicker.SelectedDate)) in Collweekend.WeekDays,
Notify(
"You selected a weekday.",
NotificationType.Success
),
Notify(
"Do not select a weekend.",
NotificationType.Error
)
)

Weekday() converts the selected date into its weekday number. Text() matches that number to the text values in the collection. If Power Apps finds a match, the employee selected Monday through Friday. Otherwise, the app shows a weekend warning.
Pro Tip: In my projects, I use
ClearCollect()rather thanCollect()for setup collections. It prevents duplicate records when a maker clicks the setup button more than once.
You can also set a suitable starting value by following this tutorial on setting a default date in Power Apps Date Picker.
Test the Date Picker Validation
Save the app and open Preview mode. First, select the Create Collection button to load weekday values into Collweekend.
Choose a weekday such as Monday, Tuesday, or Friday from BusinessDay_DatePicker. Power Apps should display the success notification.

Now select Saturday or Sunday. Since neither value exists in the weekday collection, Power Apps shows the error notification. You can use the same condition to disable a submit button or block a Patch function that saves the leave request to a SharePoint list.

For custom updates, see how to patch a Power Apps Date Picker value.
Things to Consider
- Match data types: Compare text with text, numbers with numbers, and dates with dates. Use
Text()only when your collection stores text. - Use a column name: Reference
Collweekend.WeekDays, not onlyCollweekend, when checking collection values. - Avoid duplicate collections: Use
ClearCollect()when the collection must contain a fixed set of weekday records. - Validate before saving: Repeat the weekend check in the submit Button’s OnSelect property before using
SubmitForm()orPatch(). - Handle blank dates: Check
IsBlank(BusinessDay_DatePicker.SelectedDate)when the Date Picker does not require a selection. - Keep app logic consistent: Reuse the same validation formula across date controls in your leave management Canvas app.
Frequently Asked Questions
Why does Power Apps say it can’t convert a Date to a Boolean?
This error occurs when a property needs a true/false condition but your formula supplies a date value or incompatible record. It often appears when you compare SelectedDate directly with a collection.
How do I prevent weekend dates in Power Apps?
Use Weekday() to identify the selected day. Then show an error message, disable a Button, or stop the save action when the result represents Saturday or Sunday.
What does Weekday return in Power Apps?
By default, Weekday() returns 1 for Sunday and 7 for Saturday. Monday through Friday return 2 through 6.
Can I use a collection to validate weekday selections?
Yes. Create a single-column collection containing weekday numbers, then compare the converted Weekday() result with that column.
Should I use Collect or ClearCollect in Power Apps?
Use Collect when you want to add records without removing existing ones. Use ClearCollect for fixed setup data, such as a weekday collection, because it clears old records first.
Can I disable a button for weekend selections?
Yes. Use the same Weekday() condition in the Button’s DisplayMode property. You can also learn how to disable a Power Apps button for invalid form values.
You may also like:
- Filter a Power Apps gallery with a Date Picker
- Reset a Date Picker control in Power Apps
- Convert text to a date in Power Apps
- Validate Power Apps form fields on submit
- Create a collection on Power Apps OnStart
This approach fixes the Power Apps date-to-Boolean error by comparing compatible values and using a defined collection column. Keep the validation simple, test both weekday and weekend dates, and validate again before saving your record. I hope you found this article helpful.

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.