PS Query FLOOR function shows one result when ran to screen vs Excel
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?