Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.2K SQL Developer
- 295.3K Development
- 17 Developer Projects
- 138 Programming Languages
- 292K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 27 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 390 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1K Español
- 1.9K Japanese
- 230 Portuguese
Bug? - Export to Excel: date formatted as text

Hi,
when exporting query results to Excel (2003+, .xlsx format), DATE and TIMESTAMP columns are not formatted as dates; instead, they are formatted as text.
Tested versions:
- 18.1
- 18.2
Steps to reproduce:
- Start up SQL Developer using the default settings
- Run some query on a table or view containing DATEs and TIMESTAMPs. For example, the ALL_OBJECTS data dictionary view:
select * from all_objects;
- Export query results to an Excel (2003+) .xlsx file
- Open the resulting file
Expected result:
- CREATED and TIMESTAMP columns contain numbers formatted as dates. For example:
- CREATED should contain 42746, formatted as a date (11-JAN-17)
- TIMESTAMP should contain 42746.5327893519 formatted as a date (2017-01-11:12:47:13)
Actual result:
- CREATED and TIMESTAMP columns contain text. For example:
- CREATED = "11-JAN-17"
- TIMESTAMP = "2017-01-11:12:47:13"
Best Answer
-
It's among the Top 5 requests for SQL Developer
https://apex.oracle.com/pls/apex/f?p=43135:7:::NO:RP,7:P7_ID:18381
Answers
-
we don't format the cells when we build the excel file, so you just need to select the column, ctrl+1, and set the date formatting as desired
-
@ Danilo: xxx_OBJECTS is misleading as the column named "TIMESTAMP" is actually of VARCHAR2(19) type!
@Jeff: not sure what you're saying, i've been wondering before why sqldev did not export date columns as such to excel. It appears to me they are exported as text formatted according to one's NLS date mask - checked in 4.1 and 18.2
-
It's among the Top 5 requests for SQL Developer
https://apex.oracle.com/pls/apex/f?p=43135:7:::NO:RP,7:P7_ID:18381