My start/end date was Date
and I have changed it Date/Time
datatype after doing that my formula is broken:
IF(ISPICKVAL(Employee_Status__c, "ACTIVE") ,
TODAY() >= Emp_Start_Date__c && TODAY() <= Emp_End_Date__c , FALSE)
Incorrect parameter type for operator '>='. Expected Date, received
DateTime (Related field: Formula)
Best Answer
You need to cast the DateTime value into a Date for use with other Date values. Wrap your
Emp_Start_Date__c
field in aDATEVALUE
function to cast it, or useNOW()
as a comparison operator, as it returns a DateTime, which you can use without casts.From the Working with Date and Date/Time documentation: