是的,如果你知道格式和plsql很少.
假设您的格式为日期'yyyy-mon-dd hh24:mi:ss'.
create function test_date(d varchar2) return varchar2
is
v_date date;
begin
select to_date(d,'yyyy-mon-dd hh24:mi:ss') into v_date from dual;
return 'Valid';
exception when others then return 'Invalid';
end;
Run Code Online (Sandbox Code Playgroud)
现在你可以:
select your_date_col, test_date(your_date_col)
from your_table;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
46716 次 |
| 最近记录: |