Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thanks

share|improve this question

1 Answer 1

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

 
discard

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.