I have a form that calculates the number of minutes for a given project. Some may only take minutes, some hours, some several days. I am wondering how to take an integer or double and return the corresponding days, hours, minutes etc.
I have seen several posts that explain how to do the reverse which is convert date picker values to a number but I'm not sure how to go about this the other way.
I think the basic logic would be:
Round the double up to an integer:
floor(Double)
If this result is greater than 1440 (minutes in a day)
days = floor(Double)/1440
hours = ((floor(Double)/1440)-1140)/60
minutes = (((floor(Double)/1440)-1140)/60)-60
Not quite sure if this is right, and not sure how to write this formula. Any help would be appreciated.
Marc