Date Time calculation

0
How can I calculate only work hours in mendix 
asked
2 answers
0

HI Mohd Salman,
What is the business logic that you wanted to have to calculate Working hours in your application. 
 Can you explain the use case more in detail.

answered
0

Dear Mohd,

That is a business-dependent question, I think. E.g. when working in the Dutch health-care system, 36 hours per week is the maximum work time for 1fte. Moreover, shifts can occur any time in the week/day. Contrastingly, in Dutch education, working time is generally between 08:00 and 17:00, but there are many exceptions, e.g. when having parent-teacher assembly (in the evenings). Concluding, it completely depends on your working-time business definition.

That being said, it would be possible to create a model that would store this information: consider a Workday entity, that would have two attributes: StartTime and EndTime. Perhaps add attributes such as IsNationalHoliday, in order to prevent bookings on that day, or convenience attributes such as FriendlyName (e.g. “Wednesday”) or DateString (“1/5/16”). Subsequently, it would be possible to retrieve this Workday entity for validation purposes, or for outlining booking availability.  

Hope this helps; if it does, please mark as correct ;-)

Best regards,

Wouter Penris

answered