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 |
|
rtutus
Aged Yak Warrior
522 Posts |
Posted - 2006-10-15 : 23:23:00
|
| what re the sql functions to manipulate numbers, decimals, dates..1/ like if I have 123443.78654 I want to display just 2 decimals : 123443.78 or 3 decimals ..2/ also if I want to have bankers rounding3/ how about dates conversion : from string to date type and vice versa and adding dates, substracting dates, getting the day, the month....what re the SQL functions to do that pls |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-15 : 23:28:32
|
| 1. You can use CONVERT function to limit no. of decimals e.g. select CONVERT(NUMERIC(10,2), 100.272478)2. What do you mean by bankers rounding? There are rounding functionsl like ROUND(), CEILING() and FLOOR() which you can use as per your requirement.3. Again CONVERT function will help you to convert from dates to string... Also see date functions in BOL.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-15 : 23:56:22
|
| Wow, KHTan!!That's wonderful bunch of articles...Thanks !!!Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-10-16 : 00:00:50
|
I just google for it and . . .  KH |
 |
|
|
|
|
|
|
|