Export xls with dates from Oracle SQL Developer
7,193
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.
Related videos on Youtube
Author by
RNJ
Updated on September 18, 2022Comments
-
RNJ almost 2 years
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