web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to force duration to display hours not days

(1) ShareShare
ReportReport
Posted on by

I've seen many requests for this but haven't found a solution.  If you aren't a coder (like me) and want CRM to simply display hours (*consistently*) rather than presuming the user wants them converted to days if >24, how do you do this?

I know you can create a second field and work some Javascript magic to convert it (if you know JS, which I barely do) but what if the field is a rollup?

I've also been burned after hiring people to code things only to find out their code was not using supported methods and I had to rip it all out at each upgrade.

We have rollups in Cases that report total hours used on Case S/A's.  They are reporting hours in a 'days' format to our end users which is making their jobs very difficult since they have to constantly convert to hour units.

Any (supported) solutions appreciated.

*This post is locked for comments

I have the same question (0)
  • PS Profile Picture
    23,577 on at

    What is your roll up field doing or whats the function it holds?

    I guess it cant be handled through rollup field

  • Daniel at VNS Profile Picture
    on at

    it just counts hours of all SAs in each case.  but the mathematical and formatting functions are very limited.

    i thought about creating a child field using a calculation that would take the result from this field and /24 but you cannot apply calculations to rollups.

    my options are limited without being a JS expert.  I'd prefer to just convert the rollup data (if it can be captured) to hours with JS but am having a hard time figuring it out.

    11_2D00_7_2D00_2016-1_2D00_21_2D00_35-AM.gif

  • PS Profile Picture
    23,577 on at

    Billable time does not seem to be an OOb field, what data type it is?

  • Daniel at VNS Profile Picture
    on at

    Correct.  

    Whole number / Simple / Duration

  • Verified answer
    PS Profile Picture
    23,577 on at

    Hi Daniel,

    You will have to create two new fields on case form:

    1. Rollup field (Decimal) like the way you have currently configured except for the fact that your current field is whole number

    2. Calculated field (Decimal)>> equal to rollup field/60

    Its entirely upto you, if you want to use your current rollup field and create new calculated field but in that case you will not be able to get decimal values; if it works for you, go ahead

    Let me know, if you need more help !

  • Suggested answer
    PS Profile Picture
    23,577 on at

    Hi Daniel,

    You will have to create two new fields on case form:

    1. Rollup field (Decimal) like the way you have currently configured except for the fact that your current field is whole number

    2. Calculated field (Decimal)>> equal to rollup field/60

    Its entirely upto you, if you want to use your current rollup field and create new calculated field but in that case you will not be able to get decimal values; if it works for you, go ahead

  • Verified answer
    Drew Poggemann Profile Picture
    4 on at

    Hi Daniel,

    I did the following:

    1.  Created a custom field called "Total Minutes" on the case entity and set the field as a Decimal Field with precision of 2 and set the rollup similar to yours (I did actual duration) for my test

    2.  This set the field value to the total minutes of duration of all the service activities.  Example is I had two service activities that I completed and 1 was 25 hours and 1 was 1 hour and this field showed a value of 1560 which is correct.

    3.  I then created a calculated field called "Total Hours" on the case entity as a decimal with precision of 2 which was set to the value of new_totalminutes/60

    4.  I added the total hours field to the form and it shows a value of 26 which is what I expected.

    Does this solve your challenge?

    Thanks much,

  • Drew Poggemann Profile Picture
    4 on at

    :)  Ok, so I was working out and testing the solution and publishing my reply and I didn't notice Prashant was putting the same reply in.  At least you know two people have tried the same thing :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans