Classic ASP BasicsFor beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
After a sum function I have the following results.
years = 5
months = 33
Of course the logical function is:
months = 33 -> (24) + 9 = 9
years = 5 + (2) = 7
So, I have to divide months with number <12> but I don`t know how to keep the interger part of the result without "round-ing" and how to get the rest of the division.
OK. I found the solution!
----------
years = 5
months = 33
i_months = months \ 12
years = years + i_months
j_months = i_months * 12
months = months - j_months
response.write "<td>Years: "&years&" AND months "&months&"</td>"
-----------
Once again I feel so stupid that I couldn`t find this solution with my first try! :(