I am trying to convert a string value to long. As the number is too big for integer. $Integer.parseInt normally works but in this case, it saying the number is too big.
I tried
$Long.parseLong($variable) or
$variable.longValue()
The line of code is:
#set ($cos= $Long.parseLong($kbpsValue) / 1000)
When i print the value of $cos, it just prints the variable name.
The value of kbpsValue is 4451400000.
$Longdoesn't exist in VTL. AndString.toLong()doesn't exist in Java. If the conversion tool is available in the context, you can try:which relies upon the NumberFormat.parse(String) method.