17,377
社区成员
发帖
与我相关
我的任务
分享
select case
when to_char(sysdate, 'hh24miss') between '080000' and '165959' then
'上班时间'
else
'下班时间'
end
from dual;
-- 不考虑周六、日及节假日的话,可以简单这样写:
SELECT (case when to_char(sysdate,'HHMI')<'0800' OR to_char(sysdate,'HHMI')>'1700'
then '非上班时间'
else '上班时间' end) as "现在是否为上班时间"
FROM dual;