Oracle之:Function :getdate()

mac2022-06-30  141

create or replace function getdate(sp_date varchar) return date is Result date; begin if LENGTH(sp_date) =10 then Result:=to_date(sp_date,'YYYY-MM-dd'); end if; if LENGTH(sp_date) =8 then Result:=to_date(sp_date,'YYYYMMdd'); end if; return(Result); end getdate;

转载于:https://www.cnblogs.com/bilaisheng/p/10210989.html

最新回复(0)