| Author |
Topic |
|
aditya2010
Starting Member
10 Posts |
Posted - 2010-04-12 : 20:21:02
|
| Hi,I need some help with decimals rounding.Ex:if i have a decimal value of 10.45 or anything less than 10.50 then i need to return 9.99 as ouput decimal otherwise say if the value is more than 10.50 then i need to return 10.99.Its very urgent.Please suggest me.Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
aditya2010
Starting Member
10 Posts |
Posted - 2010-04-12 : 21:53:08
|
| Hi thanks for replys.I did do some logic around there instead using round function.Get the decimal partAdded a codition to see if the deciaml part is less than or greater than 0.5 then wrote some logic toto get my desired value.But noe i need some other help,after getting the desired value from the above thread say 9.99 or 10.99 ,i am doing a mathematical function.Say 10.99/1.1----9.9909090 this is the result i am getting.Because the desired value is money type.Now i need some help ,i want to get the value 9.9909090 as 9.99 wihtout rounding.Please suggest me a way.Thanks. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-04-12 : 22:35:10
|
LOL multi-tasking bug  KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2010-04-13 : 08:30:05
|
quote: Originally posted by aditya2010 I need some help with decimals rounding.....Its very urgent.
quote: Originally posted by tkizer How come?
He works for NASA and the lander will be entering the planet's atmosphere at any time now.________________________________________________If it is not practically useful, then it is practically useless.________________________________________________ |
 |
|
|
|