Copy to Excel and Date/Time Field

When I run a query, select the results and then use the "Copy to Excel" function, it appears that the time portion of Date fields is truncated.

In PL/SQL Developer the field shows as: 1/1/1900 9:06:00 AM
Excel shows: 1/1/1900 (and I checked that it isn't just formatting)
If I just use copy (ctrl-c) and then paste it into Excel I get the correct information: 1/1/1900 9:06:00 AM

Any chance this will be fixed in the 8.0 upgrade? (I am using 7.1.5.1398.)
 
I did a little test with "select sysdate from dual", and it copies to excel with time fraction. Can you try the same?
 
Using the Copy to Excel with "select sysdate from dual" does work for me, but "Select from Table" does not. (The field is of type DATE.)

Try this script:

CREATE TABLE Test (TestDate DATE);

INSERT INTO Test VALUES (to_date('01/01/1900 3:05:00 PM','mm/dd/yyyy HH:MI:SS AM'));

SELECT * FROM Test;

DROP TABLE Test;
 
This seems to be caused by the date value (01/01/1900). Dates later than 1900 work fine. We'll see if we can fix this.
 
It would be great if you could fix it as part of the 8.0 release, because in the data we get the date portion is 1/1/1900 if only the time portion is supplied, but sometimes the date is there, and we need it too.
 
Back
Top