VB: Round up decimal value by truncate floating point
So I was searching for a method to get the integer value from a floating number but found a quick workaround towards the problem. Below is what I have come up with:
function convertInt(value as double) as integer
dim arrayNo
arrayNo=Split(value,”.”)
convertInt=arrayNo(0)
end function
I believe the above function code is self explainatory. Anyone have a better way or suggestion?
Written by admin on August 21st, 2007 with
no comments.
Read more articles on Personal and Programming.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article