You need to sign in to do that
Don't have an account?
Eric Pohlabel
Error creating validation rule based on Date - DATEVALUE error
I have a business need to restrict a picklist value if a particular DateTime field is within 180 days. My rule looks like this:
I cant seem to figure out what Im doing wrong!
AND( ISPICKVAL(Recurring_Post__c , "Yes"), DATEVALUE( Last_Drafted_Date__c )<NOW()-180)Last_Drafted_Date__c is of type DateTime which is why I am using the DATEVALUE function to return a Date BUT I keep getting the folowing error: Incorrect argument type for function 'DATEVALUE()'
I cant seem to figure out what Im doing wrong!
Instead of using NOW(), try using TODAY().
You might also want to rethink your date comparison. Right now, your formula is checking if Last_Drafted_Date__c is more than 180 days in the past. If you want to check if Last_Drafted_Date__c is within 180 days, you should try this:
I hope this helps!
All Answers
Instead of using NOW(), try using TODAY().
You might also want to rethink your date comparison. Right now, your formula is checking if Last_Drafted_Date__c is more than 180 days in the past. If you want to check if Last_Drafted_Date__c is within 180 days, you should try this:
I hope this helps!