I'm very new to plsql and am having a bit of trouble with one of my assignments. I've been asked to create a date dimension table and populate it with various date information. 

I created my table as follows

```
CREATE TABLE date_dimension_table
(  
v_date DATE NOT NULL,
full_date VARCHAR2(50) NOT NULL,
day_of_week NUMBER(1,0) NOT NULL,
day_in_month NUMBER(2,0) NOT NULL,
day_in_year NUMBER(3,0) NOT NULL,
last_day_of_week_flag VARCHAR2(1) NOT NULL,
last_day_of_month_flag VARCHAR2(1) NOT NULL,
end_of_week_date DATE NOT NULL,
month_number NUMBER(2,0) NOT NULL,
month_name VARCHAR2(32) NOT NULL,
year_month CHAR(32) NOT NULL,
quarter_number NUMBER(1,0) NOT NULL,
year_and_quarter VARCHAR2(32) NOT NULL,
v_year NUMBER(4,0) NOT NULL,
CONSTRAINT date_dimension_table_PK PRIMARY KEY (v_date)
);

```

I then created the following procedure to populate the table.

```
create or replace PROCEDURE sp_populate_dates(
v_first_date_in DATE,
v_second_date_in DATE)

AS
--Declare two variables as DATE datatypes
v_current_date DATE;
v_end_date     DATE;

BEGIN

--Assign the start date and end date to the variables
v_current_date := TO_DATE(v_first_date_in, 'DDMMYYYY');
v_end_date := TO_DATE(v_second_date_in, 'DDMMYYYY');

--Delete whats currently in the table
DELETE FROM date_dimension_table;

--condition checks if the first date is before the second date
WHILE v_current_date <= v_end_date
LOOP
--insert into table
INSERT INTO date_dimension_table
(
    v_date,
    full_date,
    day_of_week,
    day_in_month,
    day_in_year,
    last_day_of_week_flag,
    last_day_of_month_flag,
    end_of_week_date,
    month_number,
    month_name,
    year_month,
    quarter_number,
    year_and_quarter,
    v_year       
)    
VALUES
(
    v_current_date,                                 --date
    TO_CHAR(v_current_date, 'Day, Month DD, YYYY'), --full date
    TO_NUMBER(TO_CHAR(v_current_date, 'D')) -1,     --day in week
    TO_CHAR(v_current_date,'DD'),                   --day in month        
    TO_CHAR(v_current_date,'DDD'),                  --day in year
    CASE                                            --last day of week flag
        WHEN TO_CHAR(v_current_date,'FMDay') = 'Sunday' THEN 'Y'
        ELSE 'N'
    END,
    CASE                                            --last day of month flag
        WHEN last_day(TO_DATE(v_current_date, 'MM/DD/YYYY')) = TO_DATE(v_current_date, 'MM/DD/YYYY') THEN 'Y'
        ELSE 'N'
    END,
    CASE                                            --date of next sunday
        WHEN TO_CHAR(v_current_date,'FMDay') = 'Sunday' THEN v_current_date
        ELSE NEXT_DAY(v_current_date,'SUNDAY')
    END,
    TO_CHAR(v_current_date,'MM'),                   --month number
    TO_CHAR(v_current_date,'MONTH'),                --name of month
    TO_CHAR(v_current_date,'MONTH YYYY'),           --month and year        
    TO_CHAR(v_current_date,'Q'),                    --number of quarter
    TO_CHAR(v_current_date,'YYYY Q'),               --year and quarter
    TO_CHAR(v_current_date,'YYYY')                  --year    

);
--Increment and assign the current date value to be re-evaluated
v_current_date := v_current_date + 1;

END LOOP;
END;

```

As the program has to insert information from a range of dates, I was using two dates as the input parameters and it was throwing up an error.

Example: 

```
BEGIN
sp_populate_dates(01/01/2005, 01/01/2006);
END;

```

I was then getting errors suggesting it was the wrong type of argument to call in the function. I was wondering if anyone could help with this please, and show me where I'm going wrong. Cheers