Hi
I have a problem with executing a procedure with date parameter from SQL Developer and I would need some help here.
I have a package and procedure inside with next signature:
Procedure MyProc(par_Year In Date, par_Exit_Code Out PLS_Integer, par_Exit_Message Out VarChar2) As
var_Input_Date Date := To_Date(par_Year, 'DD.MM.YYYY'); -- User Input
...
End;
I call this procedure from APEX application as Process:
Declare
var_Exit_Code PLS_Integer;
var_Exit_Message VarChar2(4000);
Begin
MyPackage.MyProc(To_Date(:P10_Year, 'DD.MM.YYYY'), var_Exit_Code, var_Exit_Message);
...
End;
and it works Ok. I supply Year over DatePicker control, where I choose one date.
Now I would like to call this same procedure from SQL Developer, where I supply some date, to get some more info from my code. I call it this way:
Declare
var_Exit_Code PLS_Integer;
var_Exit_Message VarChar2(4000);
var_Input VarChar2(25) := '10.01.2018';
Begin
MyPackage.MyProc(To_Date(var_Input, 'DD.MM.YYYY'), var_Exit_Code, var_Exit_Message);
...
End;
And when I run this PL/SQL block I get next error message:
ORA-01830: date format picture ends before converting entire input string.
What I'm doing wrong here? Why the same code work from Apex app, but not from SQL Developer?
In SQL Developer I have Database > NLS set to: DD.MM.YYYY HH24:Mi:SS, if this help anything to solve the problem.
Any clear explanation an solutions are welcome.
BB