the size of a Long, which is what CF uses for integers
Small correction for those that may not read the comments. CF primarily uses 32 bit signed Integers, not Long (which has a much greater capacity). So as the error message indicates, the size limit here is the capacity of an Integer:
- Integer.MAX_VALUE =
2147483647
- Long.MAX_VALUE =
9223372036854775807
It is worth noting that although CF is relatively typeless, some Math and Date functions also have the same limitation. For example, although DateAdd technically supports milliseconds, if you try and use a very large number:
// getTime() - returns number of milliseconds since January 1, 1970
currentDate = dateAdd("l", now().getTime(), createDate(1970,1,1));
... it will fail with the exact same error because the "number" parameter must be an integer. So take note if the documentation mentions an "Integer" is expected. It does not just mean a "number" or "numeric" ...
/
(ie non integer divisor) and format to lop off the decimals? I suppose you could use PrecisionEvaluate() or BigInteger math, but that seems like overkill.