11 Replies Latest reply: Jan 27, 2017 9:59 AM by Sunny Talwar

# Convert/Format Decimal to Appropriate Time

So I have found pieces of this discussion, but have not received a solution trying to put them all together.

I have data where the field is represented in minutes and then divided by another field to get an Average Handle Time of a call. I get results where the average is .73 minutes, 10.6 minutes, and 85 minutes as examples. I need these minutes broken out into proper Hours, Minutes, and Seconds.

So far I have tried some Time formatting and taking the results *60, but cannot solve formatting the final results to hh:mm:ss successfully. What am I doing wrong? I am assuming it's easiest to do this right away in the script?

• ###### Re: Convert/Format Decimal to Appropriate Time

Hi Jeremy,

Try the following formula: Timestamp(NUMBER, 'hh:mm:ss').

Regards,
H

• ###### Re: Convert/Format Decimal to Appropriate Time

Maybe

=Interval( Sum(Time) / Count(Calls) / ( 60 *24), 'hh:mm:ss')

• ###### Re: Convert/Format Decimal to Appropriate Time

May be this?

Table:

Interval(KeepChar(Time, '0123456789.')/1440, 'h:mm:ss') as NewTime;

Time

0.73 minutes

10.6 minutes

85 minutes

];

• ###### Re: Convert/Format Decimal to Appropriate Time

This worked really well for me, thanks. I did remove the keepchar function though, I'm not sure how it would help me.

• ###### Re: Convert/Format Decimal to Appropriate Time

I didn't know if your data included minutes or not (0.73 vs 0.73 minutes)

• ###### Re: Convert/Format Decimal to Appropriate Time

Ok, so I would love to try some of these suggestions, thank all of you, but I am having an issue.

Can anyone tell me why it is not displaying all of my data in a chart, but it will in a table box? I have never had this issue. There is data under each CALL_CENTER and each SKILL, but the data will not display in my chart... I am working with 12k accounts, and I swear everything was displaying at one point, I even went as far as making the report over from scratch in case I altered the settings.

• ###### Re: Convert/Format Decimal to Appropriate Time

Since you have not used any aggregation (Sum or Avg or Min or Max or something else), your chart doesn't know what to show for places that have multiple values and ends up showing null. Using Sum, shows results

• ###### Re: Convert/Format Decimal to Appropriate Time

I thought there was a way to set it to just display the value instead of using an Aggregation function, but neither the thread nor the place for that discussion

• ###### Re: Convert/Format Decimal to Appropriate Time

So are your concerns resolved then?

• ###### Re: Convert/Format Decimal to Appropriate Time

You can use a straight table like a table box by using all fields you want to show as dimensions and disable 'suppress zero values' on presentation tab.

• ###### Re: Convert/Format Decimal to Appropriate Time

Hi,

maybe you mean to convert your Average_Handle_Time_MIN field in the script already?

Then maybe one solution might be also:

```SER_CAMPAIGN:
...
IN_CALL+WRAPUP/SUCCESS_OPER_TRANSFERS        as Average_Handle_Time_MIN,
Interval((IN_CALL+WRAPUP/SUCCESS_OPER_TRANSFERS)*'00:01') as Average_Handle_Time,
...

Resident SER_Opt;
```

hope this helps

regards

Marco