Following is the first few lines of my stored procedure in oracle. All I am trying to do is to pass a string into procedure, convert it into date and use it in a query. But it doesn't seem to work. Currently, the error I am being thrown at is as following:
ORA-01830: date format picture ends before converting entire input string
ORA-06512: at "APPS.PORDUCTPLANNINGFORECAST", line 26
ORA-06512: at line 1
CREATE OR REPLACE PROCEDURE APPS.PorductPlanningForecast (
vDateFrom IN varchar2,
vDateTo IN varchar2 ,
vForecastSetDPL2 IN varchar2,
out SYS_REFCURSOR
)
IS
L_CURSOR SYS_REFCURSOR;
vfrom date;
vto date;
BEGIN
vfrom:= TO_DATE(vDateFrom,'DD/MM/YYYY HH24:MI:SS');
vto:=TO_DATE(vDateTo,'DD/MM/YYYY HH24:MI:SS');
the lines having TO_DATE()
are line 26 and 27. Also, the format I am passing in is through c# which is System.DateTime
format("01/08/2013 12:00:00 AM"
) converted into a string and then passed through add
parameter as gave up on passing date as date due to date conversion errors. Please help..