New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QLIKWORLD LIVE! MAY 16 - 19TH, EARLY BIRD DISCOUNTS! REGISTER TODAY
cancel
Showing results for
Did you mean:
Creator III

Convert days format to Hours

Hi

I have "Time" field in the database with below format :

2 days 11:10:05

I need to convert the days in hours.

The result should be 59:10:05

Thanks

Labels (1)
• Qlik Sense

1 Solution

Accepted Solutions

``subfield(Time,'days',1)*24+subfield(subfield(Time,'days',2),':',1)&':'&subfield(subfield(Time,'days',2),':',2)&':'&subfield(subfield(Time,'days',2),':',3)``

like for example :

``````Data:

subfield(Time,'days',1)*24+subfield(subfield(Time,'days',2),':',1)&':'&subfield(subfield(Time,'days',2),':',2)&':'&subfield(subfield(Time,'days',2),':',3) as NewTime inline [
Time
2 days 11:10:05
3 days 12:30:55
];``````

output:

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
2 Replies

``subfield(Time,'days',1)*24+subfield(subfield(Time,'days',2),':',1)&':'&subfield(subfield(Time,'days',2),':',2)&':'&subfield(subfield(Time,'days',2),':',3)``

like for example :

``````Data:

subfield(Time,'days',1)*24+subfield(subfield(Time,'days',2),':',1)&':'&subfield(subfield(Time,'days',2),':',2)&':'&subfield(subfield(Time,'days',2),':',3) as NewTime inline [
Time
2 days 11:10:05
3 days 12:30:55
];``````

output:

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Creator III
Author

Thank You @Taoufiq_Zarra

Its working. 😊

Tags
Community Browser