I have a varchar2 column that has values int the following format 12/31/1998.
I am trying to search for rows based on this column as a date however one of two things happen:
1. If I use the following query a get an error that says not a valid month error at line 3
select product, extraction_date
from product_table
where id_number = '5639'
and extraction_date > to_date('12/31/1996', 'MM/DD/YYYY')
2. If I use the following query I don't get the rows I want
select product, extraction_date
from product_table
where id_number = '5639'
and extraction_date > '12/31/1996'
I get 12/31/1998.
Can someone help me? I am using Oracle 8.1.7
I am trying to search for rows based on this column as a date however one of two things happen:
1. If I use the following query a get an error that says not a valid month error at line 3
select product, extraction_date
from product_table
where id_number = '5639'
and extraction_date > to_date('12/31/1996', 'MM/DD/YYYY')
2. If I use the following query I don't get the rows I want
select product, extraction_date
from product_table
where id_number = '5639'
and extraction_date > '12/31/1996'
I get 12/31/1998.
Can someone help me? I am using Oracle 8.1.7