摘要: private int getWorkingDay(Calendar d1, Calendar d2) { int result = -1; if (d1.after(d2)) { // swap dates so that d1 is start and d2 is end java.util.Calendar swap = d1; d1 = d2; d2 = swap; } int betweendays = getDaysBetween(d1, d2); int charge_date = 0; int charge_start_date = 0;//开始日期的日期偏移量 int cha 阅读全文
posted @ 2010-09-20 16:06 杨超路飞 阅读(1236) 评论(0) 推荐(0) 编辑
摘要: sysdate是系统时间 xx.dd是从数据库表中取出的时间,执行结果取出所有当前系统时间在5个工作日以后的结果集。select * from tableNamewhere (trunc(sysdate -x.dd) - ((case WHEN (8 - to_number(to_char(x.dd, 'D'))) > trunc(sysdate - x.dd) + 1 THEN 0 ELSE trunc((trunc(sysdate - x.dd) - (8 - to_number(to_char(x.dd, 'D')))) / 7) + 1 END) 阅读全文
posted @ 2010-09-20 16:04 杨超路飞 阅读(553) 评论(0) 推荐(0) 编辑