Loading

Error "ORA-01861: literal does not match format string" When Using the DATE() Function With Oracle

Дата публикации: Feb 25, 2025
Описание
When using the DATE() function in a calculated field with an Oracle data source, the following error might occur:

ORA-01861: literal does not match format string

Cause

This error occurs when a literal is entered with a format string, but the length of such format string is not the same as the literal. This can sometimes occur in Tableau Desktop when using the DATE() function along with an Oracle database. 
Решение
Use the DATEPARSE() function instead of the DATE() function.

For example, if the DATE() calculation is 
DATE( STR ([Year]) + "-" + STR([Month]) + "-1" )

The matching DATEPARSE() calculation would be

​DATEPARSE("yyyy-MM-dd", (STR ([Year]) + "-" + STR([Month]) + "-1" ))
Дополнительные ресурсы
For more information about this error message, see Oracle / PLSQL: ORA-01861 Error Message.
Номер статьи базы знаний

001498372

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