You need to sign in to do that

Don't have an account?

lapaul

# How to calculate total minutes into hours

Hi,

Is there any formula to convert or calculate total minutes into hours? I have a custom field that stores

total minutes and I want to convert this into hours. Any help would be appreciated.

thanks

Paul

werewolf

Uhhh....

Minutes/60?

ThomasTTI really envy your sense of humor, werewolf.

ThomasTT

KimberlyJI placed a custom number field in Activities. It is called

. When I run a report, I get the sum of all the minutes at the bottom. I would like it to be displayed as hours and minutes. I tried the formula below and I keep getting errors, (I got this out of SFDC help and training). Is this formula supposed to go someplace else? Or, am I doing it wrong?Activity Duration in MinutesThanks.

Kimberly J.

FLOOR((Activity.Activity_Duration__c:SUM)/60)

&"Hour(s)"

&MOD((Activity.Activity_Duration__c:SUM)/60,1)*60

&"Minutes"

werewolfYour formula type should be Text if you're using that formula. Is it? werewolfAnd you can't sum a text field. If you want it to display in hours, you'll have to divide it by 60, but that will show you hours with a decimal percentage, like 3.54 hours. Salesforce.com doesn't sum non-numbers like 4:35. KimberlyJThe field is a number field, which I can sum on my report. I tried to add a formula into the report but I get error messages. werewolfYou can add a formula field to your report, but you can't _sum_ a formula field that is of type text. werewolfYou could, however, add _2_ custom summary fields to your report, one for hours and one for minutes, each one with its own math. KimberlyJI guess I don't understand what "text" you are talking about. I just want to add up my minutes and convert into hours on my report. Can you explain please? werewolf

You cannot make a formula field that converts minutes to a human-readable hours and minutes (like 4:35) and sum that. Once it becomes "4:35" it is text and cannot be summed.

As such, there's really no combination of formula fields you can add to the Activity object itself that would produce the desired effect.

The only real way to do what you want to do is create 2 custom summary fields on the report. The hours formula would be like:

FLOOR(DURATION:SUM/60)

The minutes formula would be:

MOD(DURATION:SUM,60)

These would be custom summary formulas, so you'd actually add them in step 2 of the report wizard to a Summary Report, not to the Activity object.

KimberlyJok, but I just want the readable #hours #minutes format on the report, not in the activity. I'm happy with 75minutes in an activity. When I run the report on all the activities of all the minutes, no decimals, I want the bottom row to say #hours, #minutes. is that possible?

KimberlyJI GOT IT!!! I read it over and over and it finally clicked! Thank you so much for your time! You rock!