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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting dates between ...
Power Apps
Answered

Getting dates between datepickers.

(0) ShareShare
ReportReport
Posted on by 51

Hi all after some help please,

Built the beginnings of a Holiday booking app (copied from a very good guide here)

I'd like to add in a gallery showing all dates between the start and end dates booked, to allow users to select if this day is a half day.

I imagine it is some combination of sequence and for all but I can't get it , also i'd only like to show the days we're actually booking - so exclude any weekend days and non working days ( I have this working in a label)

So for the below dates picked there are only actually 2 working days so I'd like my horizontal gallery just to have those days.

Any help will be much appreciated.

Thanks

 

2021-03-11 13_52_51-Graphs - Power Apps.png

 

 

 

Categories:
  • LiamR89 Profile Picture
    51 on at

    I have this working, could have combined the filters but it works regardless.

    Filter(
    Filter(
    Filter(
    AddColumns(
    Sequence(
    Sum(
    DateDiff(
    dte_Event_StartDate.SelectedDate,
    dte_Event_EndDate.SelectedDate,
    Days
    ) + 1
    )
    ),
    "AddedDate",
    DateAdd(
    dte_Event_StartDate.SelectedDate,
    Value
    ) - 1
    ),
    Text(
    AddedDate,
    "[$-en-US]ddd"
    ) <> "Sat"
    ),
    Text(
    AddedDate,
    "[$-en-US]ddd"
    ) <> "Sun"
    ),
    Not(AddedDate in NonWorkingDays.Date)
    )

    LiamR89_0-1615473103950.png

     



  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @LiamR89 

    Please consider changing your Formula to the following:

     

    Filter( 
     ForAll(Sequence(DateDiff(dte_Event_StartDate.SelectedDate, dte_Event_EndDate.SelectedDate, Days) + 1),
     With({_cDate: DateAdd(dte_Event_StartDate.SelectedDate, Value, Days)},
     {
     AddedDate: If(WeekDay(_cDate) = 7 || WeekDay(_cDate) = 1 || !(_cDate in NonWorkingDays.Date), Blank(), _cDate)
     }
     )
     ),
     !IsBlank(AddedDate)
    ) 

     

     

    That should give you what you are looking for and perhaps a little easier to maintain and change.

     

    I hope this is helpful for you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard