17,377
社区成员
发帖
与我相关
我的任务
分享
select * from tb where to_char(lis_info ,'yyyy-mm-dd') = to_char(sysdate,'yyyy-mm-dd')
1.显示当前时间
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') current_time from dual;
/*
CURRENT_TIME
-------------------
2007-09-29 09:29:03
1 row selected
*/
select current_date current_time from dual;
/*
CURRENT_TIME
----------------
2007-9-29 10:34:
1 row selected
*/
2.只显示日期,不显示时间
select to_char(sysdate,'yyyy-mm-dd') current_date from dual;
/*
CURRENT_DATE
------------
2007-09-29
1 row selected
*/