11 Replies Latest reply: Jul 28, 2017 3:25 AM by sony sing

# Hr to Days in UI

Hi all,

I want to convert the  hrs into days in front end  ?

how can I achieve this?

cloumnName:

Time(in hrs)

36

45

65

like that  how can I achieve?

Thanks

Sonica

• ###### Re: Hr to Days in UI

May be this

Interval(Interval#(Time, 'hh'), 'D hh')

• ###### Re: Hr to Days in UI

but for negative values it showing like below

• ###### Re: Hr to Days in UI

You have negative values in Time? What would you want to see for the negative time?

• ###### Re: Hr to Days in UI

same  -

-3

-2

-5 like that

• ###### Re: Hr to Days in UI

May be this

Dual(Sign(Time) & Interval(Interval#(Time, 'hh'), 'D hh'), Time)

• ###### Re: Hr to Days in UI

the result is not coming

• ###### Re: Hr to Days in UI

Then use FABS to get a positive value.

Fabs(Interval(Interval#(Time, 'hh'), 'D hh'))

• ###### Re: Hr to Days in UI

no I want to show negative only

• ###### Re: Hr to Days in UI

The problem is when you export to excel.

 -56 ############################################# -24 ############################################# -12 ############################################# -5 ############################################# -3 ############################################# -2 ############################################# 36 36:00:00 45 45:00:00 65 65:00:00

When copy/past Full table it's ok (on QlikView):

 time Interval(Interval#(time, 'hh'), 'D hh') -56 -2 08 -24 -1 00 -12 -0 12 -5 -0 05 -3 -0 03 -2 -0 02 36 1 12 45 1 21 65 2 17
• ###### Re: Hr to Days in UI

yes in qliksense  when I exported I get the result like above

• ###### Re: Hr to Days in UI

this worked sunny thank you