How can I get the number of days between 2 dates in Oracle 11g? [duplicate]

Or you could have done this: select trunc(sysdate) – to_date(‘2009-10-01’, ‘yyyy-mm-dd’) from dual This returns a NUMBER of whole days: SQL> create view v as 2 select trunc(sysdate) – to_date(‘2009-10-01’, ‘yyyy-mm-dd’) diff 3 from dual; View created. SQL> select * from v; DIFF ———- 29 SQL> desc v Name Null? Type ———————- ——– ———————— DIFF … Read more

BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed

One solution is to install both x86 (32-bit) and x64 Oracle Clients on your machine, then it does not matter on which architecture your application is running. Here an instruction to install x86 and x64 Oracle client on one machine: Assumptions: Oracle Home is called OraClient11g_home1, Client Version is 11gR2 Optionally remove any installed Oracle … Read more