Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know how I can export an excel file from SQL developer with the fields formatted correctly? In particular the date and time columns.


share|improve this question
up vote 2 down vote accepted

I don't think there's a setting for this in SQL Developer, but you can transform your dates into an Excel-readable Serial Date Format. I found how to do this here.

If you don't want to create a new function (this is a one-off query, you need to get data from a database with read-only access), the format string is essentially

((trunc(p_date) + v_date_differential) – (TO_DATE(’01-JAN-1900′,’DD-MON-YYYY’)-1))

where p_date is the date field, and v_date_differential is 1 if the date is after 1/1/1900, 0 if not.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.