TO_DAYS函数
虚谷数据库兼容to_days存储函数
。- MySQL
SQL> select to_days(now()) from dual;
- Xugu与MySQL一致
SQL> create or replace function to_days(indate in datetime) return int as begin return TRUNC(unix_timestamp(indate)/1000/60/60/24)+719528; end; /
虚谷数据库兼容to_days存储函数
。SQL> select to_days(now()) from dual;
SQL> create or replace function to_days(indate in datetime)
return int
as
begin
return TRUNC(unix_timestamp(indate)/1000/60/60/24)+719528;
end;
/