LISTAGG is nicely versative. (For small tables, I've gone further so as to generate INSERT statements for another DBMS when it didn't understand Oracle dates and timestamps).
SQL> create table xx ( a varchar2(5), b number, c date, d timestamp );
Table created.
SQL> insert into xx values ( 'Arby', 5, sysdate, systimestamp );
1 row created.
select 'select '
||listagg(case when data_type like '%CHAR%'
then '''"''||'||column_name||'||''"'''
when data_type = 'DATE'
then 'TO_CHAR('||column_name||',''yyyy-mm-dd hh24:mi:ss'')'
when substr(data_type,1,4) = 'TIME'
then 'TO_CHAR('||column_name||',''yyyy-mm-dd hh24:mi:ss.ff'')'
else column_name
end
,'||'',''||')within group(order by column_id)
||' from xx' as builder
from user_tab_columns
where table_name = 'XX';
SQL> /
BUILDER
-------------------------------------------------------------------------------------------------------------------------------
select '"'||A||'"'||','||B||','||TO_CHAR(C,'yyyy-mm-dd hh24:mi:ss')||','||TO_CHAR(D,'yyyy-mm-dd hh24:mi:ss.ff') from xx
SQL> select '"'||A||'"'||','||B||','||TO_CHAR(C,'yyyy-mm-dd hh24:mi:ss')||','||TO_CHAR(D,'yyyy-mm-dd hh24:mi:ss.ff') from xx;
'"'||A||'"'||','||B||','||TO_CHAR(C,'YYYY-MM-DDHH24:MI:SS')||','||TO_CHAR(D,'YYYY-MM-DDHH24:MI:SS.
--------------------------------------------------------------------------------------------------
"Arby",5,2017-01-31 13:51:19,2017-01-31 13:51:19.673299