实现方法:
create or replace function sxDate(date_in in date)return varchar2 is
result varchar2(30);
begin
result:=to_char(date_in,'YYYY-MM-DD')||
case when to_char(date_in,'hh24') between 0 and 12 then '上午' else '下午' end||
to_char(date_in,'hh24:mi:ss');
return(result);
end;