Link to home
Start Free TrialLog in
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
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial