Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

soniasweety
Contributor III

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

Tags (5)
1 Solution

Accepted Solutions

Re: Hr to Days in UI

May be this

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

11 Replies

Re: Hr to Days in UI

May be this

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

soniasweety
Contributor III

Re: Hr to Days in UI

hr.PNGbut 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?

JustinDallas
Valued Contributor II

Re: Hr to Days in UI

Then use FABS to get a positive value.

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

soniasweety
Contributor III

Re: Hr to Days in UI

same  -

-3

-2

-5 like that

soniasweety
Contributor III

Re: Hr to Days in UI

no I want to show negative only

Re: Hr to Days in UI

May be this

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

soniasweety
Contributor III

Re: Hr to Days in UI

the result is not comingdays.PNG

amartinez35
Valued Contributor

Re: Hr to Days in UI

The problem is when you export to excel.

 

-56#############################################
-24#############################################
-12#############################################
-5#############################################
-3#############################################
-2#############################################
3636:00:00
4545:00:00
6565:00:00

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

timeInterval(Interval#(time, 'hh'), 'D hh')
-56-2 08
-24-1 00
-12-0 12
-5-0 05
-3-0 03
-2-0 02
361 12
451 21
652 17
Community Browser