How to get an integer number not a decimal when we use arithmetic expression.

0
this is my calculation  using ceil function but it did not work. toString(ceil(calendarMonthsBetween($currentObject/DateOfBirth,[%BeginOfCurrentMonth%]) div 12)) I tried Ceil function but not worked. can you guys help me please?   thank yo
asked
2 answers
0

DIV returns a decimal, both ceil and floor will make that an integer, will make it a string.   

Not sure what you are trying to accomplish, but if is someone’s age that you are after, then this will do:

parseInteger(formatDateTime([%CurrentDateTime%],'yyyy'))
-parseInteger(formatDateTime($DateOfBirth,'yyyy'))-
(if($BirthdayStillToComeThisYear)then 1 else 0)

 

answered
0

The function as it's currently written would return a String. If you want the return to be a integer, you need to remove the "toString()" from your current function.

answered