• Resolved amirdorna

    (@amirdorna)


    Hi

    I have a Calculated field, which will be the result of all the processes on the form.
    It will show the result as total minutes for the project.

    Now on the next field I want the total number of minutes show like

    XX Days & YY Hours.

    Can I do that ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @amirdorna,

    Yes, of course, and the process is really simple, it is only mathematics. I will try to describe the process with an example. Assuming your current equation is: fieldname1+fieldname2 (that represents the total of minutes), a day has 24*60 minutes, and a hour 60. So, the equation should be edited as follows:

    
    (function(){
    var minutes = fieldname1+fieldname2, days=0, hours = 0;
    days = FLOOR(minutes/24*60);
    hours = FLOOR((minutes%(24*60))/60);
    return days+' Days && '+hours+' Hours';
    })()
    

    and that’s all.

    If you need additional help implementing your project, I can offer you a custom coding service from my private website:

    https://cff.dwbooster.com/customization

    Best regards.

    Thread Starter amirdorna

    (@amirdorna)

    Perfect,

    Just how can I set the days as 8 working hours, and calculate accordingly

    I mean if it is 1690 minutes, I want it to show 3 days and 4 hours.

    3 ( 8 hours working days) + 4 Hours

    Plugin Author codepeople

    (@codepeople)

    Hello @amirdorna,

    You simply should replace in the previous equation the snippet of code: 24*60 with 8*60

    and that’s all.

    I’m sorry, but the support service does not cover the implementation of the users’ projects (forms or formulas). If you need additional help implementing your project, I can offer you a custom coding service from my private website:

    https://cff.dwbooster.com/customization

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Showing How Many days and hours’ is closed to new replies.