oracle 取某个时间的数据(每周几的上午几点到几点) |
您所在的位置:网站首页 › 国外上班时间几点到几点钟 › oracle 取某个时间的数据(每周几的上午几点到几点) |
select count(*),t.分组字段 from ( select t.* ,to_char(t.时间,'HH24') stime,to_char(t.时间,'HH24mi') fz,to_char(时间,'d') from A t where 时间>=to_date('2019-12-01','yyyy-MM-dd') and ghsj=0800 a group by T.分组字段
to_char(时间,'d') 取当前时间是星期几 每星期第一天为周日 to_char(t.时间,'HH24mi') 取当前时间的小时分 o_char(t.时间,'HH24') 取当前时间的小时
|
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |