Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Adding a column of time totals


Level 2


I have a column of  time totals in a table that I'd like to add.

For example:




and so on. The method is to split/parse the string, add the rightmost 2 digits of each total to get the total minutes, and the leftmost 2 digits to get the total hours. I haven't included anything to process the minutes total further (i.e. mins / 60 etc) as I can't even get the basic calculation working first.

The code I'm trying is:

//check if at least one row exists in this section of the table

if  (_Row1.count > 0) then                                                         

     //add rightmost two digits to get minutes total

     mins = Sum (Right (Row1[*].total[*], 2))                                

      //add leftmost two digits to get hours total

     hrs = Sum (Left (Row1[*].total[*], (Len (Row1[*].total[*] - 3))))  


I'd appreciate someone telling me why this is not working. The table is dynamic and rows are added as needed. 

Message was edited by: HarryOhm

0 Replies


Level 2

Please disregard. I got it working finally.


Level 2

What was the final code that worked?