Forum Stats

  • 3,814,896 Users
  • 2,258,927 Discussions
  • 7,892,883 Comments

Discussions

Bug? - Export to Excel: date formatted as text

Danilo Piazzalunga
Danilo Piazzalunga Member Posts: 8 Blue Ribbon
edited Jul 18, 2018 6:35AM in SQL Developer

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:

  1. Start up SQL Developer using the default settings
  2. Run some query on a table or view containing DATEs and TIMESTAMPs. For example, the ALL_OBJECTS data dictionary view:
    • select * from all_objects;
  3. Export query results to an Excel (2003+) .xlsx file
  4. 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"
Danilo Piazzalunga

Best Answer

Answers

This discussion has been closed.