0

I want to use this formula field in workflow rule time trigger but i am getting error-

Error:

Formula result is data type (Text), incompatible with expected data type (Date/Time).

formula field code is below.

IF(ISPICKVAL(Priority_Time__c, "P1"),  Now()- 0.03109,  

IF(ISPICKVAL(Priority_Time__c, "P2"),Now()- 0.03800), 

"false"  )  )
9
  • 1
    "false" is not a Date/Time, you need to fix your FALSE scenario and return null or another valid Date/Time Commented Jul 4, 2017 at 5:54
  • Hi Bachovski, Whether i am returning null than also got same error Error: Formula result is data type (Text), incompatible with expected data type (Date/Time).
    – Md Parwej
    Commented Jul 4, 2017 at 5:57
  • what do you want to return in false case scenario? Commented Jul 4, 2017 at 5:57
  • Try this IF(ISPICKVAL(Priority_Time__c, "P1"), Now() - 0.03109, IF(ISPICKVAL(Priority_Time__c, "P2"), Now() - 0.03800, null), null) Commented Jul 4, 2017 at 5:58
  • If condition will be true than return Date/Time.If false than it should also return flase in Date/Time type
    – Md Parwej
    Commented Jul 4, 2017 at 6:00

1 Answer 1

0

This should work

> IF(ISPICKVAL(Priority_Time__c, "P1"), Now() - 0.03109,
> IF(ISPICKVAL(Priority_Time__c, "P2"), Now() - 0.03800, null))
1
  • Hi Night Your above solution is working Thanks Night
    – Md Parwej
    Commented Jul 4, 2017 at 7:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .