1:获取当时间
select now() ;
2:获取当前日期
select current_date;
3:获取当前时间
select current_time;
4:日期转为时间戳
(‘变量’ - TO_DATE('1970-1-1', 'yyyy-mm-dd')) * 86400000 - TO_NUMBER(SUBSTR(TZ_OFFSET(SESSIONTIMEZONE), 1, 3)) * 3600000
07-29
684
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-12
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-11
2720
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)