Print Thread
Copy to Excel and Date/Time Field
#33895 04/28/09 07:41 PM
Joined: Feb 2009
Posts: 23
U
Member
OP Offline
Member
U
Joined: Feb 2009
Posts: 23
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.)

Re: Copy to Excel and Date/Time Field
UMG Developer #33901 04/29/09 10:16 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
I did a little test with "select sysdate from dual", and it copies to excel with time fraction. Can you try the same?


Marco Kalter
Allround Automations
Re: Copy to Excel and Date/Time Field
Marco Kalter #33910 04/29/09 06:37 PM
Joined: Feb 2009
Posts: 23
U
Member
OP Offline
Member
U
Joined: Feb 2009
Posts: 23
Using the Copy to Excel with "select sysdate from dual" does work for me, but "Select <DateField> 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;

Re: Copy to Excel and Date/Time Field
UMG Developer #33914 04/30/09 11:22 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
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.


Marco Kalter
Allround Automations
Re: Copy to Excel and Date/Time Field
Marco Kalter #33921 04/30/09 09:35 PM
Joined: Feb 2009
Posts: 23
U
Member
OP Offline
Member
U
Joined: Feb 2009
Posts: 23
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.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.040s Queries: 14 (0.015s) Memory: 2.5165 MB (Peak: 3.0430 MB) Data Comp: Off Server Time: 2024-05-20 06:31:49 UTC
Valid HTML 5 and Valid CSS