Skip to main content

TO_DATE without date format

ZPA rule for PL/SQL and Oracle SQL · ToDateWithoutFormat

Always specify the date format in TO_DATE calls.

Examples​

Noncompliant Code Example
begin
var := to_date('2015-01-01');
end;
Compliant Solution
begin
var := to_date('2015-01-01', 'YYYY-MM-DD');
end;