I would create a Java action for this because in Mendix you would need to calculate all the seconds, minutes and hours seperately. It can be done but Java would be quicker. See also stackoverflow: https://stackoverflow.com/questions/4927856/how-can-i-calculate-a-time-difference-in-java
Regards,
Ronald