当前位置: 代码迷 >> Oracle技术 >> Oracle中日期怎么判断的
  详细解决方案

Oracle中日期怎么判断的

热度:36   发布时间:2016-04-24 08:25:23.0
Oracle中日期如何判断的
如何在IF里判断当前时间大于早上7点并且小于晚上7点。

------解决方案--------------------
SQL code
if(to_date(to_char(sysdate,'hh24:mi:ss'),'hh24:mi:ss')>to_date('07:00:00','hh24:mi:ss') and to_date(to_char(sysdate,'hh24:mi:ss'),'hh24:mi:ss')<to_date('19:00:00','hh24:mi:ss')) thenend if;
  相关解决方案