Hey, I have a varchar2 field in one of my Oracle tables - RECORDDT. Sample data in this field is 20160607 20160608 20160609 I want all the data which is recorded in the last 2 Years. The way which I'm doing it right now is something like: SELECT * FROM RECORDS WHERE TO_DATE(RECORDDT,'YYYY/MM/DD') > (SELECT ADD_MONTHS( TO_DATE(SYSDATE,'YYYY/MM/DD'), -24 )-1 FROM DUAL) I see dates before 2 years in the result set for the above query which is incorrect, but when I use SELECT * FROM RECORDS WHERE TO_DATE(RECORDDT,'YY/MM/DD') > (SELECT ADD_MONTHS( TO_DATE(SYSDATE,'YY/MM/DD'), -24 )-1 FROM DUAL) I see data as expected (records which are not older than 2 years). Why is this comparison mismatch happening? Is the issue related to NLS? I tried to convert the dates to number, but again I saw unexpected result. Thanks in advance!