1 CREATE OR REPLACE FUNCTION GET_WEEK (V_RQ in DATE) return varchar2 as 2 str varchar2(20); 3 str1 varchar2(20); 4 5 begin 6 str :=TRIM(TO_CHAR(TRUNC((V_RQ+TO_CHAR(TRUNC(V_RQ,'YYYY'),'D')-1 -TRUNC(V_RQ,'YYYY'))/7)+1,'00')); 7 return str; 8 end;
来源:博客园
作者:JJ_JeremyWu
链接:https://www.cnblogs.com/jeremywucnblog/p/11421775.html