cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
makhan1215
New Member

Leave Request form

Hello, I am working on leave request app but when i select leave start date and end date it does not exclude weekend from it. below are my FX. Please check

 

Onchange startdate and enddate picker:

RoundDown(DateDiff(StartDate.SelectedDate,EndDate.SelectedDate,Days)/7,0)*5+Mod(5+Weekday(EndDate.SelectedDate)-Weekday(StartDate.SelectedDate),5)

 

Label where total applied leave display when select start and end date. FX below.

FX on label Text:

DateDiff(Switch(Radio1.Selected.Value,"Half Day",DateAdd(StartDate.SelectedDate,12,Hours),StartDate.SelectedDate),Switch(Radio2.Selected.Value,"Day",DateAdd(EndDate.SelectedDate,24,Hours),EndDate.SelectedDate),Hours)/24

 

Please let me know how to exclude weekend from date selection

0 REPLIES 0

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,732)