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
redfieldredfield 

formula to calculate "days"

I have a formula field that calculates the value of 2 date/time fields when subtracted 
TEXT(FLOOR( (Paused_End__c - Paused_Start__c) * 24 )) & " Hours " &
TEXT(ROUND((( (Paused_End__c - Paused_Start__c) * 24 )* 60),0)) & " Minute"

and its result is "23  Hours 20 Minute"

How can i add the days as well, what function formula will I use so it will show "2 Days 23 Hours 20 Minute"
Best Answer chosen by redfield
FearNoneFearNone
try this,
TEXT( ROUND(Paused_End__c - Paused_Start__c, 0) ) & " Days " &
...

that should be working now.

All Answers

FearNoneFearNone
convert it to date then subtract, it will return Integer.
TEXT( Paused_End__c.day() - Paused_Start__c).day() ) & " Days " &
...

 
redfieldredfield
syntax says, Error: Unknown function Paused_End__c.day. Check spelling.
FearNoneFearNone
try this,
TEXT( ROUND(Paused_End__c - Paused_Start__c, 0) ) & " Days " &
...

that should be working now.
This was selected as the best answer
redfieldredfield
thank you so much! this solves it 
suresh sanneboina 4suresh sanneboina 4
TEXT( FLOOR( Paused_End__c  - Paused_Start__c) ) & " days " 
& TEXT( FLOOR( MOD( (Paused_End__c  - Paused_Start__c) * 24, 24 ) ) ) & " hours " 
& TEXT( ROUND( MOD( (Paused_End__c  - Paused_Start__c ) * 24 * 60, 60 ), 0 ) ) & " minutes"
redfieldredfield
suresh sanneboina 4, THIS ALSO SOLVED MY PROBLEM! it resulted 2 days 0 hours 1 minutes, YOU GUYS ARE GREAT! THANK YOU