Converting Seconds to Minutes on Time Fields

Prev Next

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.

If you are looking for adding seconds to date/time fields in Natterbox, please see this guide.

Row-Level Formula

You could make a row-level formula on the report. Salesforce has a limit of 1 row-level formula per report.

  1. You need to click the down arrow and then 'Add Row-Level Formula'

  2. Now, you need to name the column and add the formula to the box. You can configure the decimal points as you desire.

  3.  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.

  1. Click the setup cog in the top right and then go to the object manager.   

  2. Search for ‘Call Reporting’ and then click ‘Fields & Relationships’.  

  3. Now, click ‘New’ to create a new field  

  4. Step 1: Choose the field type

    1. Type = Formula

    2. Next

  5. Step 2: Choose output type

    1. Field Label = something like ‘Time Talking (minutes)’ or ‘From Call Queue Last Wait Seconds (minutes)’

    2. Formula Return Type = Text

    3. Field Name = this auto populates

    4. Leave the rest of the options as default

    5. Next

  6. Step 3: Enter formula

    1. 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

    2. Description = something like ‘This field is used to convert a time field into minutes for reporting purposes’

    3. Help Text = something similar to above

    4. Next

  7. Step 4: Establish field-level security

    1. Leave field-level security as default unless you wish to customize.

    2. Next

  8. Step 5: Add to page layouts

    1. We recommend you leave this as default so the reporting gate field can be seen on the call reporting page layout

    2. Save

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