Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
Terry_0101

# How to convert minutes to Hours & Minutes?

This formula field on cases object displays in minutes such as "125" minutes:     (Emailed_time__c - CreatedDate) * 1440

How to show this in "2 Hours 5 Minutes"?

These articles are useless:
https://help.salesforce.com/apex/HTViewSolution?id=000004635&language=en_US
Himanshu Parashar
Hi Samantha,

```if(FLOOR( FLOOR(Emailed_time__c - CreatedDate)) !=0,TEXT( FLOOR( Emailed_time__c - CreatedDate) ) + ' days ','') +
if(FLOOR( FLOOR( Emailed_time__c - CreatedDate)) ==0 && FLOOR( MOD((Emailed_time__c - CreatedDate) * 1440, 1440) / 60)!=0,TEXT( FLOOR( MOD((Emailed_time__c - CreatedDate) * 1440, 1440) / 60) ) + ' hours ','')+

if(FLOOR( FLOOR( Emailed_time__c - CreatedDate )) ==0 && Round(MOD( MOD((Emailed_time__c - CreatedDate) * 1440, 1440), 60),0)!=0,
TEXT(Round(MOD( MOD((Emailed_time__c - CreatedDate) * 1440, 1440), 60),0) ) + ' mins','') ```

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

SF_Guha
Try this article as well...  Wil let you know if I come across something more useful.

https://help.salesforce.com/apex/HTViewSolution?id=000005091&language=en_US
Himanshu Parashar
Hi Samantha,

```if(FLOOR( FLOOR(Emailed_time__c - CreatedDate)) !=0,TEXT( FLOOR( Emailed_time__c - CreatedDate) ) + ' days ','') +