How to retrieve time difference between to times ?

0
I want to retrieve the time difference between two times (start and stop) and save that value as total work time. ex. I started at 08:00 and I stopped working at 15:34. My total worktime is 7:34. startTime and stopTime are both date and time datatype but i formatted it as time in my datagrid. What is the best possible solution in Mendix for this ?
asked
2 answers
2

You can create a microflow which calculates the time between both dateTime elements.

On this page you can read more about the between date function.

I think would calculate the minutes between and determine the full hours and leftover minutes to get a work time 7h 34min. Or use hours between and take the rest value (after the decimal) to recalculate it to minutes. Say 0.5 hour should be translated into 30 min.

answered
1

You can use the "minutesbetween" function in Mendix, see the referrence guide for more info: https://world.mendix.com/display/refguide6/Between+date+function+calls

answered