Yes, it is 08FEB2017:00:00:00 Other condition as below: ((substr(t1.bill_type,1,2) not in('11','12','21','22','26') and substr(t1.bill_type,2,2) not in('11','12','21','22','26'))) If I am using : WHERE (t1.CLAIM_ADMIT_DATE BETWEEN '8Feb2017:0:0:0'dt AND '8Aug2017:0:0:0'dt) AND (substr(t1.bill_type,1,2) not in('11','12','21','22','26') and substr(t1.bill_type,2,2) not in('11','12','21','22','26')); I am able to have reult. but If I am using: WHERE (t1.CLAIM_ADMIT_DATE >= TODAY()-183 AND t1.CLAIM_ADMIT_DATE <=TODAY()-7)) AND (substr(t1.bill_type,1,2) not in('11','12','21','22','26') and substr(t1.bill_type,2,2) not in('11','12','21','22','26')); Will no result at all. also if I am only using: WHERE (t1.CLAIM_ADMIT_DATE >= TODAY()-183 AND t1.CLAIM_ADMIT_DATE <=TODAY()-7) I will get the result. make me cry.
... View more