Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist

SUM the minutes and seconds and show in mm:ss

Hi All,

I have a data field like this below. I want to show the SUM of this field and the result should be in mm:ss format. How to SUM this?

 

00:05
00:06
00:34
00:38
00:39
1:39
00:02
00:03
00:04
00:07
00:08
00:09
00:10
1 Solution

Accepted Solutions
jagan
Luminary Alumni

Hi,

Try this script

load *,

TimeStamp#(ElapsedTime, 'hh:mm') AS Time_Format

Inline [

    ElapsedTime

    00:30

    00:28

    00:05];

and in front end use this expression

=Timestamp(Sum(Time_Format), 'hh:mm')

Hope this helps you.

Regards,

Jagan.

View solution in original post

10 Replies
dmohanty
Partner - Specialist
Author

Hi All,

Any help here please!

Anonymous
Not applicable

Use the Interval() function.

For example, this script,

load * Inline [
    ElapsedTime
    00:30
    00:28
    00:05]
;

with this function,

=interval(sum(ElapsedTime),'mm:ss')

will yield 63:00.

dmohanty
Partner - Specialist
Author

In the expression the above Calculation is showing 00:00 every time.

ziadm
Specialist

Hi

interval(sum(TimeSpent),'hh:mm:ss')

missing hours format hh

this should be ok

Regards

Ziad

dmohanty
Partner - Specialist
Author

This has not helped either.

Is it because I have some other dimensions as well?

jagan
Luminary Alumni

Hi,

Try this script

load *,

TimeStamp#(ElapsedTime, 'hh:mm') AS Time_Format

Inline [

    ElapsedTime

    00:30

    00:28

    00:05];

and in front end use this expression

=Timestamp(Sum(Time_Format), 'hh:mm')

Hope this helps you.

Regards,

Jagan.

MK_QSL
MVP

=Interval(SUM(Time#(TimeField,'h:mm')),'hh:mm')

ankitaag
Partner - Creator III

Hello,

Write the expression as

=Sum(Timestamp(ElapsedTime,'hh:mm'))

Thanks and Regards,

Ankita

dmohanty
Partner - Specialist
Author

Thank you Jagan.

This has worked.