oracle 获取当前时间、字符串转date,timestamp
程序员文章站
2022-07-14 19:46:12
...
一、获取当前时间
date:
select sysdate from dual;
timestamp:
select systimestamp from dual;
二、字符串转date,timestamp
date:
select to_date('2020-06-09 12:25:23','yyyy-mm-dd hh24:mi:ss') from dual;
timestamp:
select to_timestamp('2020-06-09 00:00:00','yyyy-mm-dd hh24:mi:ss') from dual;
上一篇: C++获取当前时间字符串