Exportieren von xls mit Datumsangaben aus Oracle SQL Developer

4672
RNJ

Weiß jemand, wie ich eine Excel-Datei mit korrekt formatierten Feldern vom SQL-Entwickler exportieren kann? Insbesondere die Datums- und Uhrzeitspalten.

Vielen Dank

4

1 Antwort auf die Frage

2
technomalogical

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.