Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Decimals and Displaying Whole Numbers

Status
Not open for further replies.
Dec 11, 2009
60
US
I have a field "HoursWorked" that displays 164.000

I want it to return 164, how can I accomplish that?
 
What if the value was 164.2 or 164.5 or 164.9? What would you like to show then?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
If you only have whole numbers, you could alter the column to be an INT column (or BIGINT if the values get that large). If the values being stored are decimal numbers but you only want to display whole numbers, then George has a good question. Do you want to round up, round down, or just drop the decimal value?

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top