You need to sign in to do that
Don't have an account?
Heena Chauhan
Urgent - Formula Query.
Hello All,
I wanted to convert Days,Hours into Minutes and populate the value in minutes field as a SUM value of all i.e. (Days(should be converted into minutes)+Hours(should be converted into minutes) +Minutes = Minutes).
Example:
I have a field Days which is populated from below formula:
Text( FLOOR( Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c ) )
Now, I want to populate Minutes value which should be a SUM of Days(converted to mins)+Hours(converted to mins)+Minutes for which I have a formula as shown below:
Text(FLOOR((( Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c) *1440)*24) //Days//
+
Text(ROUND(((Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c )*60),0)) //Hours//
+
Text(ROUND(((Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c ))))) //Minutes//
When I try to execute the formula, I get an error as :
Error: Incorrect parameter type for operator '+'. Expected Number, Date, DateTime, received Text
Please assist me with the correct formula to display the value in minutes.
Thanks in advance!
I wanted to convert Days,Hours into Minutes and populate the value in minutes field as a SUM value of all i.e. (Days(should be converted into minutes)+Hours(should be converted into minutes) +Minutes = Minutes).
Example:
I have a field Days which is populated from below formula:
Text( FLOOR( Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c ) )
Now, I want to populate Minutes value which should be a SUM of Days(converted to mins)+Hours(converted to mins)+Minutes for which I have a formula as shown below:
Text(FLOOR((( Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c) *1440)*24) //Days//
+
Text(ROUND(((Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c )*60),0)) //Hours//
+
Text(ROUND(((Date_Time_Gas_Off__c - Date_Time_Gas_Riser_Commissioned__c ))))) //Minutes//
When I try to execute the formula, I get an error as :
Error: Incorrect parameter type for operator '+'. Expected Number, Date, DateTime, received Text
Please assist me with the correct formula to display the value in minutes.
Thanks in advance!
Try below formula .Error is with the return type of the field you selected. As you selected the formula field return type as number and using the TEXT function whose return type is TEXT leads the output as TEXT. So Either change the formula field return type to TEXT else try below code.
Let me know if you face any issues,
Thanks and regards,
Sai Krishna Tavva
All Answers
Try below formula .Error is with the return type of the field you selected. As you selected the formula field return type as number and using the TEXT function whose return type is TEXT leads the output as TEXT. So Either change the formula field return type to TEXT else try below code.
Let me know if you face any issues,
Thanks and regards,
Sai Krishna Tavva
However, I am trying using the above formula but getting an error as below:
Error: Incorrect number of parameters for function 'ROUND()'. Expected 2, received 1.
Please assist.
Many Thanks!!
It worked Sai ,Vineet.
Thank you Vineet and Sai for your quick response.
Cheers!!