Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
FusionFashion
Starting Member
9 Posts |
Posted - 2010-07-19 : 21:13:32
|
| Dear Team,Good Day!!What will be the best function to use when you want the results to be rounded off to two decimal places?For Example: My result is 46.72555, i want that the result will be 46.73.Here is my code:SELECT DATEDIFF(minute,dbo.tblAttendanceDetail.TimeIn, dbo.tblAttendanceDetail.TimeOut)/60.0 FROM tblAttendanceDetailColor 'N Spice |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-07-19 : 21:27:32
|
round( < the number > , 2) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
FusionFashion
Starting Member
9 Posts |
Posted - 2010-07-19 : 21:51:05
|
Thanks.. It's already fine now. Color 'N Spice |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-20 : 03:38:17
|
| orselect cast(46.72555 as decimal(12,2))MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|