- 26 Apr 2024
- 2 Minutes to read
- Print
- DarkLight
12.1.3. Time Fields on Reports (Seconds to Minutes)
- Updated on 26 Apr 2024
- 2 Minutes to read
- Print
- DarkLight
Most of the Natterbox Call Reporting time fields are in seconds not minutes. If you want to convert to minutes, there are two ways of doing this for use in reporting.
Row-Level Formula
You could make a row-level formula on the report. Salesforce has a limit of 1 row-level formula per report.
You need to click the down arrow and then 'Add Row-Level Formula'
Now, you need to name the column and add the formula to the box. You can configure the decimal points as you desire.
Now click apply. You might need to save and name the report before doing this.
Formula Field on the Object
You could make a custom formula field on the call reporting object. This is needed if you want more than 1 time field in minutes on a report.
Click the setup cog in the top right and then go to the object manager.
Search for ‘Call Reporting’ and then click ‘Fields & Relationships’.
Step 3: Enter formula
Enter the formula from below (either simple or complex). Make sure the field reference is correct for your use case, for example: nbavs__From_Call_Queue_Total_Wait_Seconds__c
Description = something like ‘This field is used to convert a time field into minutes for reporting purposes’
Step 4: Establish field-level security
Formulas
Simple formula
If you want the value 105 seconds as 1.75 minutes, use this formula:
Field/ 60
For example if you converting the field Time Talking into minutes, this would be the formula:
nbavs__From_Time_Talking__c/60
Complex formula
If you want the value 105 seconds as 00:01:45, use this formula:
IF(ISBLANK( FIELD), NULL,
LPAD(TEXT FLOOR(FIELD /60 / 60)),2,"0") + ":" +
LPAD(TEXT(FLOOR (FIELD)/60) - FLOOR(FIELD /60 / 60)*60),2,"0") + ":" +
LPAD(TEXT FLOOR(MOD((FIELD)/60, 1)*60)),2, "0"))
For example if you converting the field Time Talking into minutes, this would be the formula:
IF(ISBLANK( nbavs__From_Time_Talking__c ),NULL,
LPAD(TEXT( FLOOR(nbavs__From_Time_Talking__c /60 / 60)),2,"0") + ":" +
LPAD(TEXT(FLOOR( (nbavs__From_Time_Talking__c)/60) - FLOOR(nbavs__From_Time_Talking__c /60 / 60)*60),2,"0") + ":" +
LPAD(TEXT( FLOOR(MOD((nbavs__From_Time_Talking__c)/60,1)*60)),2,"0"))
For more help, on how to use this formula, see this Salesforce help guide: Convert Activity CallDurationInSeconds (Decimal) to Hours:Minutes:Seconds (Time) Format
Please note: that guide is being used on the Task/Activity object, you will be creating a formula field on the Call Reporting object for Natterbox metrics.
For any other formulas, please see Salesforce help.