@allister said in Substring giving me errors:
@rokiroki
Sorry bud, I didn't see this come across my feed!
You can also use Math.trunc(decs). Just change the type from String to expression when setting the variable.
log(Math.trunc(13.37));
// expected output: 13
log(Math.trunc(42.84));
// expected output: 42
log(Math.trunc(0.123));
// expected output: 0
log(Math.trunc(-0.123));
// expected output: -0
uraabk method worked too, thank you
Between mind checking my pm?