How to count just weekdays in

Headshot of Matt the Planet No Code Bubble Coach

Need 1 to 1 help?

Your no-code consultant & Bubble tutor.

In this Bubble tutorial, you'll learn how to exclude certain days of the week from a list of dates in your Bubble app.

How to Exclude Certain Days of the Week in Bubble App

Have you ever wondered how you can exclude certain days of the week from a list of dates in your Bubble app? Well, I'm going to show you in this video, but before I dive into it, we've got hundreds of Bubble tutorial videos that you can't find on YouTube. You can only find them on our website, So join our No Code App Builder community there today.


Let me just demo this. It's gonna be really, really quick. I've got a
, and then I'm adding in 12 days. You can see that today is indeed Friday, but it skips Saturday and Sunday, then goes through the next week and then skips the following Saturday and Sunday until it arrives at that plus 12 days.


So let me show you how I've gone about and done this. The air date/time picker version 2, which is the only one that's now available, is that's because of the change over the response vengeance. Anyway, it should look like this. You can say selected range as a list, and then you can filter that list. So you can say this date, and we're talking about an individual date in the list. Now, we can extract the day, and when we extract the day in Bubble, it returns a bit like an index value of days starting from Sunday. So Sunday returns zero, so I'm saying not zero. And then Monday would return one, and it counts all the way through to Saturday, and so Saturday is six. That's why I've got these constraints in there. And then I'm simply saying format in a way that I can clearly demonstrate to you the day of the week and the date. And then I'm using join with and line break, and that has enabled me to get this list here where each item is listed on a separate line. Notice it doesn't actually print line break. That is how you use join with to achieve a line break when you're joining together a list of text items.

Counting the Dates

I'll show you one other thing here. What if we wanted to just know how many there were? Let's add in a text label, and I'm gonna say, "Well, I don't want to a