asp classic round down number

How do i round down a number isASP classic

ie 1.7 becomes 1

thanks

dave
david_88Asked:
Who is Participating?
 
aprestoConnect With a Mentor Commented:

But if this is 24.57 it will round to 25. If you want this then amazingwolf1 has it bang on. If you want to round down no matter what the decimal. You could just take the number before the decimal, problem solved.

dim var
var = 12.56
Response.write Left(cstr(var), InStr(cstr(var), ".")-1)

Open in new window

0
 
amazingwolf1Commented:
Hi:
-----------------------------
Example 1
dim x
x=24.13278
document.write(Round(x))

Output:24

-----------------------------
Example 2
dim x
x=24.13278
document.write(Round(x,2))

Output:24.13
-----------------------------
HTH
0
 
david_88Author Commented:
this is the solution i was look for (round down always) thanks worked perfectly
0
 
aprestoCommented:
No problem, happy to help :)
Apresto
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.