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.
In this case, use this formula with an output type of Float:
TO_NUMBER(TO_NCHAR({timeelapsed}))
Related Topics
- Advanced Sample Formula Fields
- Combining CONCAT and other Functions to Calculate String Values
- Casting Field Values using TO_NUMBER and TO_NCHAR
- Currency Consolidation and Conversion Using Custom Formula Fields
- Conditional Evaluations Using CASE WHEN
- Calculating Amounts for Relative Date Ranges
- Calculating Specific Dates