title: oracle convert timestamps to other time masks
body: <p>How do I convert these number columns (timestamp, event_dt) to a date or time mask?
  I am trying this:</p>
  
  <pre><code>    select to_char(timestamp,'YYYY-MON-DD HH24:MI:SS'), domain_c, to_char(event_date,'YYYY-MON-DD HH24:MI:SS'), total_reads from TOP_READ_EVENTS where timestamp= to_char(sysdate-2,'yyyymmdd') || '0000'
                           *
  ERROR at line 1:
  ORA-01481: invalid number format model
  
  
  SQL&gt; desc top_read_events;
   Name                      Null?    Type
   ----------------------------------------- -------- ----------------------------
   YEAR                           NUMBER
   QUARTER                        NUMBER
   MONTH                          NUMBER
   DAY                            NUMBER
   HOUR                           NUMBER
   TIMESTAMP                      NUMBER
   DOMAIN_C                       VARCHAR2(255)
   EVENT_DT                       NUMBER
   TOTAL_READS                        NUMBER
  
  
  
  
  select timestamp, domain_c, event_dt, total_reads from TOP_READ_EVENTS where timestamp= to_char(sysdate-2,'yyyymmdd') || '0000'    
  
   TIMESTAMP DOMAIN_C              EVENT_DT  TOTAL_READS
  ---------- ------------------------------  ------------ -------------
  2.0111E+11 b.e.att-mail.com         2.0111E+11         14406
  2.0111E+11 bounce.emailinfo2.bestbuy.com    2.0111E+11         14156
  2.0111E+11 bounce.bluestatedigital.com      2.0111E+11         13701
  2.0111E+11 plentyoffish.com         2.0111E+11         13384
  2.0111E+11 mail.classmates.com          2.0111E+11         13281
  2.0111E+11 comcast.net              2.0111E+11         13241
  2.0111E+11 uniquelistsmail.com          2.0111E+11         13135
  2.0111E+11 tankgorilla.com          2.0111E+11         12835
  2.0111E+11 frigidphoenix.com            2.0111E+11         12657
  </code></pre>