HS date conversion error
I have successfully copied a table from foxpro db using the ODBC HS connection which I followed from the docs.
The sample command was:
create table EMP as select * from emp@foxpro_db;
I found some puzzling result on the date fields though
when I compared the 2 tables (oracle and foxpro).
select bday from emp
On Oracle DB:
select bday from emp;
which I presumed will be the same result as above (foxpro result). but
when i display it using to_char(bday,'mm-dd-yyyy ')
select to_char(bday,'mm-dd-yyyy ') from emp;
The month and day seemed ok but the year were not, i cant even see
a pattern how much did it added to it.
Any idea plsssss.....thanks
Each DBMS use specific storage format for dates.
You should have used date format in the create statement.
Can you describe the table emp?
you might need to pre-create the table and use date conversion during data copying
hi hunnies... the bday in emp is in DATE datatype format the HS assigned it
automatically....what defference does it make if I precreate it as DATE.
how do I display the 4-digit year value in foxpro? It might be that
the year value really was the same as shown in the oracle display
Last edited by jennifer2007; 02-28-2007 at 04:18 AM.
create table tabname (f1 datatype, bday date)
insert into tabname select f1, to_date(bday,'MM/DD/YY') from tabname2@foxpro
Click Here to Expand Forum to Full Width