根据日期获取月份

时间:2017-06-15 15:01:46

标签: date db2

如果天数不到当月的15日,那么我应该获得当月,并且在15日之后。应该滚到下个月。

我正在使用db2 db

1 个答案:

答案 0 :(得分:0)

select case when day(current date)<15 then month(current date) else month(current date + 1 month) end from your table
相关问题