时间:2021-07-01 10:21:17 帮助过:31人阅读
日期转换毫秒
SELECT TO_NUMBER(TO_DATE(‘2014-07-28 17:12:45‘, ‘YYYY-MM-DD HH24:MI:SS‘) - TO_DATE(‘1970-01-01 8:0:0‘, ‘YYYY-MM-DD HH24:MI:SS‘)) * 24 * 60 * 60 * 1000 FROM DUAL;
获取某天的信息
select * from WORKSCANINFO where TO_CHAR(SCANDATE,‘DD-MM-YY‘) in( SELECT TO_CHAR(1511539200000 / (1000 * 60 * 60 * 24) + TO_DATE(‘01-01-70‘, ‘DD-MM-YY‘), ‘DD-MM-YY‘) AS CDATE FROM DUAL)
ORACLE:毫秒与日期的相互转换,获取某天的信息
标签:number har rom inf from to_date can pre ora