title: OLEDB error ORA-01861
body: <p>I'm connecting throught Qlikview to pl/sql (oracle) and for the same script I use an ODBC connection and the script runs with no issues but when I connect using an OLEDB I receive an error ORA-01861: literal does not match format string. My question is mainly why would my script work using an ODBC connection but not with the OLEDB?</p>
  
  <p>Adding code as I would like to make my query compatabile with the OLE DB Connection...The below is where the hang up is occuring...</p>
  
  <pre><code>SELECT DISTINCT B.CLT_CLT_PGMID,TO_CHAR(B.FIRST_PHONE_CONTACT,'MM/DD/YYYY') AS FIRST_PHONE_CONTACT,
                          ABS(TO_DATE(B.FIRST_ASSGN_DT, 'DD-MM-YYYY') - TO_DATE(B.FIRST_PHONE_CONTACT, 'DD-MM-YYYY')) AS FIRST_Contacted_By_Phone_Days
  
           FROM (
                  SELECT DISTINCT MIN(SERVICE_DATE) AS FIRST_PHONE_CONTACT
                                     ,a.FIRST_ASSGN_DT, a.FIRST_CONTACT_DT, d.is_visit, d.attempt_or_contact,a.PERS_GEN_KEY,a.CLIENT_PROGRAM,a.clt_clt_pgmid
  
                    FROM  A
                      LEFT JOIN   D ON A.CLT_CLT_PGMID = D.CLT_CLT_PGMID AND A.ID_CARD = D.ID_CARD
  
                      WHERE 1=1
                     rownum &lt;10
  
                        GROUP BY  a.FIRST_ASSGN_DT, a.FIRST_CONTACT_DT, d.is_visit, d.attempt_or_contact,a.PERS_GEN_KEY,a.CLIENT_PROGRAM,a.clt_clt_pgmid
                                                                                                                                                           ) B
  </code></pre>
  
  <p>the below is where the error is occurring
    ABS(TO_DATE(B.FIRST_ASSGN_DT, 'DD-MM-YYYY') - TO_DATE(B.FIRST_PHONE_CONTACT, 'DD-MM-YYYY')) AS FIRST_Contacted_By_Phone_Days</p>