Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Time format with days

Hi Guys,

I'm trying to show the spent time in several tasks in a graph but I can't get the format that I need.

I want to show the numbers with days, hours and minutes, but when the time is more than a day, only I can show the hours and minutes.

Thanks a lot

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Maikel,

to get 'Days' in Text try like yhis

Replace(Date(date,'DD/MM/YYYY'&' @'),'@','Days')

Regards,

Antonio

View solution in original post

8 Replies
Colin-Albert

What defines a day for your problem?

Is a day 24 hours, or a working day of say 8 hours.

Can you provide some examples of the start and end data showing the expected output?

Anonymous
Not applicable
Author

Hi Colin,

Is a day of 24 hour

jmvilaplanap
Specialist
Specialist

Hi,

You can try with:

if(floor(sum(Time)) > 0, num(floor(sum(Time)), '#,### days' )) & ' ' & Time(sum(Time), 'hh:mm')

With this, you could see: x days 22:33

Anonymous
Not applicable
Author

Hi Jose,

This solution works, but I can't use it in chart objects, only in texts,

There is no way to do something like time(mytime, 'dd Days, hh:mm');

Regards

chris_johnson
Creator III
Creator III

Hi,

You could try looking at the interval() function, I think this might help get what you want (although I've not tried it myself):

Interval ‒ QlikView

The examples seem to suggest you can separate days out

Anonymous
Not applicable
Author

Hi Adam,

This almost works, but is not possible to write the word "Days" inside the format. Because D is like a day(numeric), y as year and s as second.

There are not escape characters?

Thanks

antoniotiman
Master III
Master III

Hi Maikel,

to get 'Days' in Text try like yhis

Replace(Date(date,'DD/MM/YYYY'&' @'),'@','Days')

Regards,

Antonio

Anonymous
Not applicable
Author

Great workaround Antonio!