Oracle返回星期几的函数


做Oracle报表时遇到需求滚动展示周数据,除掉周六和周天的数值,简单记录下。

在sql语句where条件中添加:to_char(d1.d_day,'d')not in(1,7)--去掉周六周日两天

现有时间维表d_timeday,执行sql:

select * from d_timeday d where to_char(d.d_day,'d') not in(1,7)

实现效果:

相关内容