4 Replies Latest reply: Nov 15, 2016 4:02 AM by Sébastien Fatoux

Need to change into d:hh:mm format

Hi All,

I have an filed called MTBF which is in Minutes.

The expression is below:

(((Outage_Sys_MonthEndDate - Outage_Sys_MonthStartDate)*24*60) - sum(Outage_OutageDuration)*1440)/count(distinct Outage_sys_id)

I am doing below to change the format:

interval((((Outage_Sys_MonthEndDate - Outage_Sys_MonthStartDate)*24*60) - sum(Outage_OutageDuration)*1440)/count(distinct Outage_sys_id) , 'd:hh:mm')

But still it is showing in minutes.

Please help.

Sarif

• Re: Need to change into d:hh:mm format

Hi Sharif,

You need to give to interval a value in day. Just divide your value in minutes by (24*60) and you will have the result that you want:

interval(((((Outage_Sys_MonthEndDate - Outage_Sys_MonthStartDate)*24*60) - sum(Outage_OutageDuration)*1440)/count(distinct Outage_sys_id))/(24*60) , 'd:hh:mm')

• Re: Need to change into d:hh:mm format

Try this line

=interval(( (((Outage_Sys_MonthEndDate - Outage_Sys_MonthStartDate)*24*60) - sum(Outage_OutageDuration)*1440)/count(distinct Outage_sys_id) ) , 'D:hh:mm')

Regards

Anand

• Re: Need to change into d:hh:mm format

hi Sebastain,

This is working. Thanks a lot.

If you don't mind could you please explain this.

Thanks,

Sarif

• Re: Need to change into d:hh:mm format

Interval function request a value in day or fraction of day.

You used this function with value in minutes. By dividing your value by the number of minutes per day (24 * 60) you have the value in fraction of day and it will be correctly interpreted by Interval function.