SQL - How to decrease decimal places (or remove the extra zero's at the end)
Posted on 2008-10-29
I have a table1 that saves the duration for a trip. table1 contains the following columns:
To calculate the duration of the trip, I am using the following query:
select ((hourEnd-hourStart) + ((cast((minuteEnd-minuteStart) as decimal))/60)) as trip from table1
This works, except the results have too many zero's at the end:
I want to format this as followed:
Is there a way to decrease the decimal places (or remove the extra zero's at the end)?