PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

PS Query FLOOR function shows one result when ran to screen vs Excel

edited Jan 30, 2018 5:04PM in PeopleTools and Lifecycle Management - PSFT (MOSC) 2 commentsAnswered ✓

I'm using the following formula to calculate service date.  We need the number to round down.  So if you have 3 years and 9 months of service, the result should return 3.

expression:  FLOOR(MONTHS_BETWEEN(TO_DATE(SYSDATE),TO_DATE(A.SERVICE_DT,'YYYY-MM-DD')))/12

expression type:  number

length:  3

decimals is blank

Today is 1/30/18.  When I run the query in edit mode, to the screen, the result of the above formula for a service date of 3/10/08 is 9.  When I click and download the results to Excel, the number appears to be 10, but it's actually 9.8 when you click on the cell and view the formula bar.  9 is the result we are going for.  Am I using the correct formula to achieve this?

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center