## DATE_JOUR_EDT

Doc
Details
Grants
References
Dependencies
Code

TEXT
    FUNCTION          "DATE_JOUR_EDT"
    ( annee IN NUMBER
    , nosemaine IN NUMBER
    , nojour IN NUMBER
    ) RETURN DATE AS
    dateDepart varchar2(10);
    res date;
    BEGIN
     dateDepart := '31/12/' || to_char(annee-1);
    SELECT NEXT_DAY(to_date(dateDepart,'DD/MM/YYYY'),1) +
        (noSemaine - 1) * 7 + noJour INTO res FROM dual;
    return res;
    END DATE_JOUR_EDT;