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
uuuu 

Error: Incorrect argument type for operator '+'.

Hii Friends,'
When i was doing additon of two cutsom Field of type "Time" in formula field of type "Time".
X1__c  +  X2__c 
It shows error like
Error: Incorrect argument type for operator '+'.

Please Help me
Thank you
Best Answer chosen by uu
chanchal_:)chanchal_:)
Make return type of formula as number where dedimal place is 2.

and then try writing like this 
(Hour(X1__c) + Hour(X2__c)) + ((Minute(X1__c) + Minute(X2__c))/60)

 

All Answers

chanchal_:)chanchal_:)
Make return type of formula as number where dedimal place is 2.

and then try writing like this 
(Hour(X1__c) + Hour(X2__c)) + ((Minute(X1__c) + Minute(X2__c))/60)

 
This was selected as the best answer
AbhishekAbhishek (Salesforce Developers) 
Anitha,

you can use the below format too.

TEXT( FLOOR ( time_out__c - time_in__c ))  & " Days " & TEXT( ROUND( MOD (( time_out__c - time_in__c ) *24 , 24), 0) )  &" Hours " & TEXT( ROUND( MOD (( time_out__c - time_in__c ) *1440 , 60), 0)) &" Minutes "

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.
uuuu
Hey Chanchal
Thank you.