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 Apps
Unanswered

Calculating Hours

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone, i am making an app that count the extra hours worked by some engineers but on weekends the hours value is 1.5, so i need to adapt this formula to decompose, for example, if it starts on a Friday at 10:00 p.m. and ends at 02:00 a.m. on Saturday, the total value of the hours should be 5 (2+3)

 

With(
        {
            wStart: dp_Fecha_Inicio_Solicitud.SelectedDate + Time(
                Value(dp_Hora_Inicio.Selected.Value);
                Value(dp_Min_Inicio.Selected.Value);
                0
            );
            wEnd: dp_Fecha_Fin_Solicitud.SelectedDate + Time(
                Value(dp_Hora_Final.Selected.Value);
                Value(dp_Min_Final.Selected.Value);
                0
            )
        };
        With(
            {
                wDiff: wEnd - wStart
            };
            Round(Abs(wDiff) * 24; 1)
        )
    );

Categories:

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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard