Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Time hh:mm:ss to number

Hello,

I received a 'timestamp' like 01:45:00 and these are the hours a employee worked in the building.

Is there a formula whih can convert this to 1,75 'hours'....

Friso 

4 Replies
Chanty4u
MVP
MVP

may be u can try

=    Interval#('01:45:00', 'HH:MM:SS') * 24

Chanty4u
MVP
MVP

orelse

Data:

Load *,

Timestamp(Timestamp#( TIMESTAMP,'DD/MM/YYYY hh:mm:ss:fff'), 'hh:mm:ss')  as Time,

Timestamp(Timestamp#( TIMESTAMP,'DD/MM/YYYY hh:mm:ss:fff'), 'hh')  as Hour;

load * Inline

[

TIMESTAMP

26/10/2014 01:06:44:340

]

mightyqlikers
Creator III
Creator III

HI try this.

hour('01:45:00')+Minute('01:45:00')/60

$@M.

sunny_talwar

This seems to work as well:

=Time#('01:45:00', 'hh:mm:ss') * 24

or this in the script


Time#(TimeField, 'hh:mm:ss') * 24 as WorkingHours