+ Start a Discussion
Glenn Nyhan 91Glenn Nyhan 91 

Error: Incorrect parameter type for operator '>='. Expected DateTime, received Number Description Help Text

I have been asked to create a formula to tackle this:

If Ground_Break_Photos_Upload_Date__c (which is a Date/Time field) is >= minus 14 days from  Ground_Break_Date__c (which is a Date field) then Ground_Break_Report_Due__c (Formula (Date) field) = Ground_Break_Date__c minus 7 days

So far my formula is:

DATETIMEVALUE(Ground_Break_Photos_Upload_Date__c) >=- 14

But I get this error message when I check the syntax: 

Error: Incorrect parameter type for operator '>='. Expected DateTime, received Number

Does anybody know what's wrong and can help.   
Best Answer chosen by Glenn Nyhan 91
Andrew GAndrew G
IF( DATEVALUE(Ground_Break_Photos_Upload_Date__c) >= Ground_Break_Date__c - 14, 
    Ground_Break_Date__c - 7 ,
     NULL )

As noted in the error, you are comparing a date to a number which doesn 't computed.

Regards
Andrew

 

All Answers

Andrew GAndrew G
IF( DATEVALUE(Ground_Break_Photos_Upload_Date__c) >= Ground_Break_Date__c - 14, 
    Ground_Break_Date__c - 7 ,
     NULL )

As noted in the error, you are comparing a date to a number which doesn 't computed.

Regards
Andrew

 
This was selected as the best answer
Glenn Nyhan 91Glenn Nyhan 91
Thanks, Andrew! I'll give this a shot. 
Glenn Nyhan 91Glenn Nyhan 91
Thanks again. This worked fine. I very much appreciate your help!