## DATE_JOUR

Doc
Details
Grants
References
Dependencies
Code

TEXT
    FUNCTION          "DATE_JOUR" (annee IN NUMBER,noSemaine IN NUMBER,noJour IN NUMBER)
    RETURN DATE IS
    dateDepart VARCHAR2 (10);
    res DATE;
    vjour VARCHAR2(10);

    BEGIN
    dateDepart := '31/12/' || to_char(annee-1);

    SELECT NEXT_DAY(to_date(dateDepart,'DD/MM/YYYY'),1) +
        (noSemaine - 1) * 7 + noJour-1  INTO res FROM dual;
    RETURN res;
    END date_jour;