fippif
asked on
SQL - How to decrease decimal places (or remove the extra zero's at the end)
I have a table1 that saves the duration for a trip. table1 contains the following columns:
hourStart
hourEnd
minuteStart
minuteEnd
To calculate the duration of the trip, I am using the following query:
select ((hourEnd-hourStart) + ((cast((minuteEnd-minuteSt art) as decimal))/60)) as trip from table1
This works, except the results have too many zero's at the end:
1.500000
I want to format this as followed:
1.50
Is there a way to decrease the decimal places (or remove the extra zero's at the end)?
hourStart
hourEnd
minuteStart
minuteEnd
To calculate the duration of the trip, I am using the following query:
select ((hourEnd-hourStart) + ((cast((minuteEnd-minuteSt
This works, except the results have too many zero's at the end:
1.500000
I want to format this as followed:
1.50
Is there a way to decrease the decimal places (or remove the extra zero's at the end)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.