Loading

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

Publiseringsdato: Feb 25, 2026
Beskrivelse
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.
Løsning
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')
Flere ressurser
Date Functions
 
Knowledge-artikkelnummer

001471502

 
Laster
Salesforce Help | Article