下面语句可以得到当前的周的开始和结束.
db2 => select date(days(current date) - dayofweek(current date)+2) as Monday, date(days(current date) - dayofweek(current date) + 8) as Sunday from sysibm.sysdummy1;
MONDAY SUNDAY
---------- ----------
11/28/2011 12/04/2011
1 record(s) selected.
db2 =>
阅读(3003) | 评论(0) | 转发(0) |