title: Change from Default Date to preferred date in this DBMS_SQL?
body: <p>This code is from the proposed solution: 
  <a href="https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9541646100346616701" rel="nofollow noreferrer">https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9541646100346616701</a></p>
  
  <p>My query is <code>'select * from table'</code></p>
  
  <p>The second column is a DATE and this routine writes it as appears in my IDE session ('DD-MON-YY');</p>
  
  <p>How can I report the values in DATE columns to 'YYYY-MM-DD'?</p>
  
  <pre><code>procedure clob_maker(p_query varchar2) is
  
        l_theCursor     integer default dbms_sql.open_cursor;
        l_columnValue   varchar2(4000);
        l_status        integer;
        l_descTbl       dbms_sql.desc_tab;
        l_colCnt        number;
        n number := 0;
  
        l_data clob;
    begin
        dbms_sql.parse(  l_theCursor,  p_query, dbms_sql.native );
        dbms_sql.describe_columns( l_theCursor, l_colCnt, l_descTbl );
  
        for i in 1 .. l_colCnt loop
            dbms_sql.define_column(l_theCursor, i, l_columnValue, 4000);
        end loop;
  
        l_status := dbms_sql.execute(l_theCursor);
  
        while ( dbms_sql.fetch_rows(l_theCursor) &gt; 0 ) loop
            for i in 1 .. l_colCnt loop 
                dbms_sql.column_value( l_theCursor, i, l_columnValue );
                --dbms_output.put_line(l_columnValue);  --this puts every column on a separate line
                  l_data := l_data || l_columnValue ||',';
            end loop;
              dbms_output.put_line(l_data);
            n := n + 1;
        end loop;
        --dbms_output.put_line(l_data);
    end  clob_maker;
  
  clob_maker('select * from mlb_catcher_birthdays fetch first 10 rows only');
  </code></pre>