How to format the results of subtrcating a date to show only two decimals

As you can see form the attachment, my results are more than two decimal places for DAYS_SINCE_REVIEW. How can I cast this column two display only the first two decimals? ex. 30 not 30.79595864855

Current SQL:
select
WO_NUMBER
, CUSTOMER_PO
, CUSTOMER_NAME
, CUSTOMER_CODE
, CSM
, DEPT_NAME SHOP
, PN
, SERIAL_NUMBER
, DESCRIPTION
, ENTRY_DATE WO_CREATION
, STATUS WO_STATUS
, ENTRY_DATE + 5 as ESTIMATED_QUOTE_DATE
, LAST_QUOTE_SENT
, LAST_QUOTE_STATUS QUOTE_STATUS
, LAST_QUOTE_APPROVED
, LAST_QUOTE QUOTE_NUMBER
, QUOTED_AMOUNT
, SHIP_DATE as ESTIMATED_SHIP_DATE
, LAST_QUOTE_SENT - ENTRY_DATE AS DAYS_SINCE_REVIEW
FROM ba_view_wo_summary
where syscm_auto_key=1 and pbh_customer='N' and status not in ('CLOSED','CANCELLED','CLS INVOICE') and dept_name not like '%GSE%'
order by due_date asc

Open in new window



Thank you
Capture.PNG
maximus1974Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sdstuberCommented:
floor(LAST_QUOTE_SENT - ENTRY_DATE) AS DAYS_SINCE_REVIEW

or

trunc(LAST_QUOTE_SENT - ENTRY_DATE) AS DAYS_SINCE_REVIEW

for non-negative numbers there is no functional difference between these two options.

if you might have negative numbers, then you'll probably want the TRUNC instead of FLOOR
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.