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 / Calculating Working ti...
Power Apps
Unanswered

Calculating Working time and date

(0) ShareShare
ReportReport
Posted on by 271

Hello , 

I am working on a form in which project managers will add an employee's working time as follows. 

Aysan_0-1677111581830.png

The decimal value shows the number of working hours for instance, 0.5 means EMP1 worked 80 hours on the project1

I need to do some calculations and break the days into working days and weeks to post those dates to the ERP system.

 

 

I was wondering if there is a way to break down the working time into days and working hours and remove the weekend. 

Using the following formula, I could show the days and times in a table. 

 

With({startDate:DateValue(_firstDayOfMonth),
// sequenceDays: Sequence(DateDiff(DateValue(_firstDayOfMonth),DateValue(_lastDayOfMonth)))
sequenceDays: Sequence(RoundDown(DateDiff(_firstDayOfMonth, _lastDayOfMonth, Days) / 7, 0) * 5 +Mod(5 + Weekday(_lastDayOfMonth)- Weekday(_firstDayOfMonth), 5))
},
ClearCollect(colDates,
AddColumns(sequenceDays,
"Date",
DateAdd(startDate, Value - 1, Days),
"Day Num",
"Day " & (Value),
"Day Name",
Text(DateAdd(startDate, Value - 1, Days),"dddd"
),
"WorkingTime", lbl_TimeAmount*160 / ( RoundDown(DateDiff(_firstDayOfMonth, _lastDayOfMonth, Days) / 7, 0) * 5 +Mod(5 + Weekday(_lastDayOfMonth)- Weekday(_firstDayOfMonth), 5))
)))

Aysan_2-1677112094504.png

Thanks you!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard