-
I am trying to insert a date column into a table.
The format from the file that the date is coming from is 021101,020901,080200,etc.
How do I insert it?
using this syntax "insert into table_name (date_column_name) values (to_date('02-02-02'));"
does not seem to work. Any Idea how to make this insert work?
-
I just tried this. I am not sure if it is what your looking for but it may be a start in the right direction
select to_date('020202', 'YYMMDD') from dual;
Result
TO_DATE('
---------
02-FEB-02
to use to_date you give it the date string that you are receiving and also the format that the date string is in. In my case I was giving it Year month day so the format was 'YYMMDD'
You can try to toss that into your insert and see what happens