Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Round to one decimal place based on two datetime fields

Status
Not open for further replies.

Jdbenike

MIS
Sep 11, 2008
74
US
Code:
ROUND(convert(decimal(10,1), datediff(minute, shiftstartdate, shiftenddate) / 65.0), 1)

This code right here brings back a 7.8
The value without the round is 7.85

So, if I change the code to convert(decimal(10,2) it brings back 7.90

How do I return a value of just 7.9. shiftstartdate and shiftenddate are datetime values.
 
Is this your same question I answered in the other forum?
thread1462-1541483
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top