Loading

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

Дата публикации: Feb 25, 2026
Описание
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.
Решение
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')
Дополнительные ресурсы
Date Functions
 
Номер статьи базы знаний

001471502

 
Загрузка
Salesforce Help | Article