Calculating Duration Values with TO_NUMBER and TO_NCHAR

Duration values are incompatible with the TO_NUMBER function unless they are first converted to a variable format using the TO_NCHAR function. So if you want to make a custom formula field that shows duration values as a number, use this formula:

          TO_NUMBER(TO_NCHAR({field_ID})) 

        

For example, let's say you want to see the time elapsed for each case in your account, in hours.

Example of calculating duration values in the Time Elapsed column.

In this case, use this formula with an output type of Float:

          TO_NUMBER(TO_NCHAR({timeelapsed})) 

        
Time Elapsed (Hours) selected in the Formula Field Name fields. Time elapsed shown in the dataset.

Related Topics

General Notices