If you require information that can be displayed on the case record itself you can create a complex formula. An example of what a formula for CST and standard M-F business hours (these business hours need to be configured under Setup | Company Profile | Business Hours) is below:
You can try below formula for your requirment case age based on last modified in hours,It may help you to resolve your issue. Formula: Case Age in Hours - IF( IsClosed , (ClosedDate - CreatedDate) *24, (NOW() - CreatedDate ) *24) You can also refer the below link,if needed and for reference.. https://help.salesforce.com/s/articleView?id=000341512&type=1
Please mark it as best answer if its helps you to resolve your requirement. Regards, Prabhakar.T
that one is correct but that one would include weekends here I have this formula that gets the day but i want to get the hour somehow I want to convert the day to hours TEXT(
I did get this answer https://jayakrishnasfdc.wordpress.com/2020/04/20/calculate-age-of-recordformula-field-to-exclude-saturday-and-sunday/ but this one give me syntax error can you please help and fix the error
Reference :- Calculate Case age based on working business hours (https://help.salesforce.com/s/articleView?id=000329632&type=1)
Kindly mark it as the best answer if it works for you.
Thanks & Regards,
Priya Ranjan
one more question how to get the case age based on last modified in hours
Hi Syeawar,
You can try below formula for your requirment case age based on last modified in hours,It may help you to resolve your issue.
Formula:
Case Age in Hours - IF( IsClosed , (ClosedDate - CreatedDate) *24, (NOW() - CreatedDate ) *24)
You can also refer the below link,if needed and for reference..
https://help.salesforce.com/s/articleView?id=000341512&type=1
Please mark it as best answer if its helps you to resolve your requirement.
Regards,
Prabhakar.T
here I have this formula that gets the day but i want to get the hour somehow I want to convert the day to hours
TEXT(
CASE(MOD( DATEVALUE(LastModifiedDate) - DATE(1985,6,24),7),
0 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,2,2,3,3,4,4,5,5,5,6,5,1),
1 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,2,2,3,3,4,4,4,5,4,6,5,1),
2 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,2,2,3,3,3,4,3,5,4,6,5,1),
3 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,2,2,2,3,2,4,3,5,4,6,5,1),
4 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,1,2,1,3,2,4,3,5,4,6,5,1),
5 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,0,2,1,3,2,4,3,5,4,6,5,0),
6 , CASE( MOD( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) ,7),1,1,2,2,3,3,4,4,5,5,6,5,0),
999)
+
(FLOOR(( DATEVALUE(NOW ()) - DATEVALUE(LastModifiedDate) )/7)*5)
)& " Day"
I did get this answer https://jayakrishnasfdc.wordpress.com/2020/04/20/calculate-age-of-recordformula-field-to-exclude-saturday-and-sunday/
but this one give me syntax error can you please help and fix the error