You need to cast the DateTime value into a Date for use with other Date values. Wrap your Emp_Start_Date__c
field in a DATEVALUE
function to cast it, or use NOW()
as a comparison operator, as it returns a DateTime, which you can use without casts.
From the Working with Date and Date/Time documentation:
Date and Date/Time aren’t interchangeable data types, so when you want to perform operations between Date and Date/Time values, you need to convert the values so they are both the same type. Some functions (such as YEAR()
, MONTH()
, and DAY()
) also only work on Date values, so Date/Time values must be converted first.
Use the DATEVALUE( date/time )
function to return the Date value of a Date/Time. For example, to get the year from a Date/Time, use YEAR( DATEVALUE( date/time ) ) )
.