I've got a procedure that pulls data from a table based on a date within the table. I put in two parameters when running the procedure, a start and end date(my first procedure with parameters). I can't figure out how to get the format right on the date.
here's the if statement
and then here's the pl/sql block
I get this error:
ORA-01843: not a valid month
ORA-06512: at line 5
I've tried changing the date to every format I can think of but it's still giving me the error. I even went so far to match the date in the data, which is dd-mmm-yy, but still nothing. It's got to be something easy, but i can't figure it out.
Thanks for your help,
Chris
here's the if statement
Code:
if rbt_rec.PaidDate between to_date(start_date,'mm-dd-yyyy') and to_date(end_date,'mm-dd-yyyy') then
...
end if;
and then here's the pl/sql block
Code:
DECLARE
START_DATE DATE;
END_DATE DATE;
BEGIN
START_DATE := '10-01-2006';
END_DATE := '12-31-2006';
UPDATE_MC_REBATE_CSV(
START_DATE => START_DATE,
END_DATE => END_DATE
);
END;
I get this error:
ORA-01843: not a valid month
ORA-06512: at line 5
I've tried changing the date to every format I can think of but it's still giving me the error. I even went so far to match the date in the data, which is dd-mmm-yy, but still nothing. It's got to be something easy, but i can't figure it out.
Thanks for your help,
Chris