Formula Field Elapsed Time - Forum - Rollbase - Progress Community

Formula Field Elapsed Time

 Forum

Formula Field Elapsed Time

  • I have created a formula field called TotalTime.  I use this code to determine the elapsed time between two dates. 

    The elapsed time displays correctly in the debug window.  How do I return the elapsed time using this code to the formula field Total Time?

    David Dubois

  • What is "formula field Total Time" ? Please clarify.

  • TotalTime is a formula field that calculates the elapsed time between a student check in and a student check out.  It needs to return the total time in hours and minutes between that students checkout and check in time. 

    David Dubois

  • The Formula computation needs to actually return the string that you want to display.  That is, what i think you want to do is add a final line that returns the string you want to display.

    return dhm(data3);

  • You have a field of type "String" and your formula returns a string in format "00:00".

  • I keep getting an invalid return error:


    David Dubois

  • Corrected spelling of date on line 6

    David Dubois

  •  Found the answer to my problem in the documentation:  :

    David Dubois

  •  Reivised code that works correctly.

    David Dubois