I want to add two custom text field in hh:mm:ss format in a formula field. I have two field in my application that is a stop watch time capture which is stored in text format. In report i need to get the total time for the two time capture, but I don't know how can i manipulate such data to get the result that i wanted in formula field.
You can probably use TIMEVALUE function to convert text to time or you can use substitute and value as mentioned on this thread: https://trailblazers.salesforce.com/answers?id=9063A000000E0yhQAC
Here are some other threads i've found: https://trailblazers.salesforce.com/answers?id=9063A000000pZXhQAM https://help.salesforce.com/articleView?id=custom_field_time_overview.htm&type=5
You could do the above and convert both fields into one field performing the sum, or convert to two fields and performing an operation in a report.
-
when i use time value i need to add '.000' string to my string to get a time value returned, but when i use '+' operator between these two valeus from TimeValue function, it gives me error "Incorrect argument type for operator. +". I didn't properly understand the second thread, but i am trying that one – aakash poudel Dec 28 '20 at 22:24
-
It may be easier if you convert each individual text field into a time field, then do a simple: Timefield1__C + Timefield2__c in a formula field to get the sum of them, rather than try to perform a sum of both inside one formula field. Downsides to this: 2~3 new fields Upside to this: Individual reporting going forward allowing you to perform more operations. – TechieZach Dec 28 '20 at 22:33