Loading

Error "DATEDIFF is being called with (...). Did you mean (string, datetime, datetime, string)?" When Using DATEDIFF Calculation

Julkaisupäivä: Feb 25, 2026
Kuvaus
When using DATEDIFF in a calculated field, a message similar to the following may appear:
DATEDIFF is being called with (string, date, date, integer). Did you mean (string, datetime, datetime, string)?

Cause

Although DATEDIFF may be used with dates instead of datetimes, the start_of_week field must be a string and not an integer.
Ratkaisu
Ensure the correct field types are in use.

For example, the following calculation will not work:
DATEDIFF('month',[Order Date],[Ship Date],1)

Instead, the calculation should be written as follows:
DATEDIFF('month',[Order Date],[Ship Date],'sunday')
Lisäresurssit
Date Functions
 
Knowledge-artikkelin numero

001471502

 
Ladataan
Salesforce Help | Article