Please I would be grateful for you help. I wrote this simple date conversion block but getting error when I tried to pass it as a parameter. When I run this on its own in SQL developer I get no error but when I run it in a pl/sql block i get the error -1858 ORA-01858: a non-numeric character was found where a numeric was expected.
The idea is to pass this variable w_date to a package to that use a column on a table with the 24Hr date time format column e.g. 12/05/2020 14:21:07'
I am running this in Oracle 12C database on windows 10.
Many thanks for you help in advance.
declare
w_dat date;
begin
select to_date('12/05/2020 14:21:07','DD/MM/YYYY HH24:MI:SS') into w_dat from dual ;
dbms_output.put_line(w_dat);
end;
error from the dbms_ouput below
12-MAY-20
-1858 ORA-01858: a non-numeric character was found where a numeric was expected
