Avatar of maximus1974
maximus1974
 asked on

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
Oracle Database* PL/SQLSQL

Avatar of undefined
Last Comment
Sean Stuber

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Sean Stuber

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck