Hi
Use this ceil( number * 2) /2 . The ciel function gives you the
nearest integer greater than the given value. since vbscript doesnt have
that here is a workaround
Public Function Ceil(dValue)
Ceil = Int(dValue + 0.9999999999)
End Function
for this function to work make sure you dont use numbers with 10 decimal
places.
HTH
Chamindu
-----Original Message-----
From: Moshe Tapnack
To: asp4 (asp4)
Sent: 4/28/2004 11:08 PM
Subject: [ASP] rounding integers
hi gang
i'd like to round integers to the closest .5 or integer, ie:
3.4 would show: 3.5 and 3.8 would show: 4.
i've tried with cInt and round() but as you all know, that doesnt do the
trick.
is there any built in funtion for this?
thanks!
Moshe
[Non-text portions of this message have been removed]
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/