function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Terry_0101Terry_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
Best Answer chosen by Terry_0101
Himanshu ParasharHimanshu Parashar
Hi Samantha,

Please check following code if that help you
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

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

All Answers

SF_GuhaSF_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 ParasharHimanshu Parashar
Hi Samantha,

Please check following code if that help you
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

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
This was selected as the best answer