Announcements
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Ceil functionality in time

Hi All,

I have a field 'duration' having different values.

Now I want to calculate the sum of them and show the result in 'hours' using ceil function.

Expected result = 4 hrs

1 Solution

Accepted Solutions
Champion III

You can try this:

TimeDuration:

Duration

00:30:06

00:30:31

00:37:06

00:47:37

01:19:20

];

LEFT JOIN(TimeDuration)

//Time(Ceil(Frac(Ceil(Sum(Duration),1/1440)), 0.1), 'hh:ss') AS TimeInt,

Interval(Sum(Duration), 'mm') AS MinSum

Resident TimeDuration

Group By Duration;

In the front end using

= Interval(Sum(Duration), 'mm')

7 Replies
Champion III

May be try this?

Time(Ceil(Frac(Ceil(Sum(Duration),1/1440)), 0.1), 'hh')

Anonymous
Not applicable
Author

Thank you.

Can you tell how to write ceiling the time in minutes.

Champion III

you mean you want hh:mm ? or only Minutes mm

Anonymous
Not applicable
Author

for suppose, if I selected 30.06 and 19.20, I want the result to be 50minutes mm ceiling

Champion III

So you do not want Hours to be counted when you select, coz you have a value that has 1 hour 19min 20secs so you do not want to consider 1hour?

Champion III

You can try this:

TimeDuration:

Duration

00:30:06

00:30:31

00:37:06

00:47:37

01:19:20

];

LEFT JOIN(TimeDuration)

//Time(Ceil(Frac(Ceil(Sum(Duration),1/1440)), 0.1), 'hh:ss') AS TimeInt,

Interval(Sum(Duration), 'mm') AS MinSum

Resident TimeDuration

Group By Duration;

In the front end using

= Interval(Sum(Duration), 'mm')

Master II

Hi,

Try this.

Community Browser