You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started: AI Resources for Oracle Cloud HCM – Go Here

Progress with Redwood: Redwood Resources for Oracle Cloud HCM -  Go Here

SQL to pull Number of Days between two dates (one is a Parameter Date)?

I'm currently using BIP Report. This sequel works on me if I'd like to use SYSDATE:

TO_NUMBER(TRUNC(SYSDATE) - TO_DATE(TO_CHAR(SEN.SENIORITY_DATE, 'YYYY-MM-DD'),'YYYY-MM-DD')) DAYS

However, when I use a date parameter:

TO_NUMBER(TRUNC(:P_DATE) - TO_DATE(TO_CHAR(SEN.SENIORITY_DATE, 'YYYY-MM-DD'),'YYYY-MM-DD')) DAYS

I encountered an error:

ORA-00932: inconsistent datatypes: expected NUMBER got DATE

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!