You need to sign in to do that

Don't have an account?

rornelas

# need to convert values in formula number return type to to hrs

Have a fromula below that depending on how many checked it will sum up values into formula field with number return type. I would like to take this value in this formula field and create another that will convert to hrs.

IF (checkbox1__c, 15, 0) + IF (checkbox2__c, 30, 0) + IF (checkbox3__c, 90, 0)

Vivian Charlie 1208

Hi Rornelas,

Cracked it...!!!

150 / 70 = 2.14 hrs

Now let us always take the returned value upto 2 decimals only. We thus know that the range for this value will always be between 0-99 (i.e 100 possibilities) because 100 would increment the number by 1.

So here 100 equals 60 minutes.

If 100 = 60, then 14 = X

Thus we have X = (14 * 60) / 100 = 8 minutes (this implies .14 = 8 minutes)

to verify other combinations

(50 * 60) / 100 = 30 minutes (0.50 = 30 minutes)

(100 * 60) / 100 = 60 minutes which is an hour

Thanks

Vivian

## All Answers

Vivian Charlie 1208

Hi Rornelas,

Please can you provide some more details like Parts Service Cost is cost for the total minute or total hour.

How is this cost calculated and associated with timeAssuming it is cost for the total hours (just an example)

150 / 60 = 2.5 hrs (i.e 50 / hr)

Thanks

Vivian

rornelasHI Vivian,

We can do a flat rate of 70$ hr?

Please let me know if you have any further questions.

Thanks!

Vivian Charlie 1208Hi,
Assuming the totally $150 is the final amount and you want to use a flat rate of $70.
Hours = 150 / 70 i.e = 2.14 hrs
Do you also need the decimal time to be converted into minutes? I'll have to rack my brains a bit for it. rornelasAll I really need is the Parts service call value converted from minutes to hrs i.e. from 150min to 1.25hrs etc. Don't sweat your response made me think a little about the requirment. Please let me know if you come up with anything or any direction would be helpful. Vivian Charlie 1208

Hi Rornelas,

Cracked it...!!!

150 / 70 = 2.14 hrs

Now let us always take the returned value upto 2 decimals only. We thus know that the range for this value will always be between 0-99 (i.e 100 possibilities) because 100 would increment the number by 1.

So here 100 equals 60 minutes.

If 100 = 60, then 14 = X

Thus we have X = (14 * 60) / 100 = 8 minutes (this implies .14 = 8 minutes)

to verify other combinations

(50 * 60) / 100 = 30 minutes (0.50 = 30 minutes)

(100 * 60) / 100 = 60 minutes which is an hour

Thanks

Vivian