You need to sign in to do that
Don't have an account?
Michelle Arndt
Error: Formula result is data type (Number), incompatible with expected data type (Date/Time)
I have this formula: NOW() - Lead_Escalation_from_Production__c
And this is what the Lead Escalation from Production field holds (our business hours): IF(MOD(DATEVALUE(CreatedDate) - DATE(1900,1,7),7) = 6, DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 2)) & " 12:00:00"),
IF(MOD(DATEVALUE(CreatedDate) - DATE(1900,1,7),7) = 0, DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 1)) & " 12:00:00"),
IF(MOD(DATEVALUE(CreatedDate) - DATE(1900,1,7),7) = 5 && CreatedDate > DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 22:00:00"), DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 3)) & " 12:00:00"),
IF(CreatedDate > DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 22:00:00"), DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 1)) & " 12:00:00"),
IF(CreatedDate < DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 12:00:00"), DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 12:00:00"),
CreatedDate)))))
I am using a workflow rule that if the lead status is not open or has been converted i want it to do the formula above,NOW() - Lead_Escalation_from_Production__c, but I get the error message:Error: Formula result is data type (Number), incompatible with expected data type (Date/Time)
I would like to use now since it will get a closer time
Any suggestions?
And this is what the Lead Escalation from Production field holds (our business hours): IF(MOD(DATEVALUE(CreatedDate) - DATE(1900,1,7),7) = 6, DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 2)) & " 12:00:00"),
IF(MOD(DATEVALUE(CreatedDate) - DATE(1900,1,7),7) = 0, DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 1)) & " 12:00:00"),
IF(MOD(DATEVALUE(CreatedDate) - DATE(1900,1,7),7) = 5 && CreatedDate > DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 22:00:00"), DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 3)) & " 12:00:00"),
IF(CreatedDate > DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 22:00:00"), DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate + 1)) & " 12:00:00"),
IF(CreatedDate < DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 12:00:00"), DATETIMEVALUE(TEXT(DATEVALUE(CreatedDate)) & " 12:00:00"),
CreatedDate)))))
I am using a workflow rule that if the lead status is not open or has been converted i want it to do the formula above,NOW() - Lead_Escalation_from_Production__c, but I get the error message:Error: Formula result is data type (Number), incompatible with expected data type (Date/Time)
I would like to use now since it will get a closer time
Any suggestions?
You need to change the return type of your formula to a Number instead of a Date/Time. The error is saying that the formula is expecting to return a Date/Time, but the formula is actually returning a Number...
For more Info please check below link.
https://success.salesforce.com/answers?id=90630000000glUUAAY
Thanks
V varaprasad