Qlik Community

Ask a Question

New to QlikView

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

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conversion of Time

I want to calculate total working hours of a faculty

Faculty session start time is given and session End  time is given

i have calculated session duration by subtracting start time from end time.

now i want to calculate total hours and minutes a faculty has taken the lecture in 2013 year but time has limitation of 24 hrs(24:00:00) so its useless here

for e.g faculty faculty id : 20 has taken lecture of 90 Hrs and 30 min in year 2013 ( assumed value)

what expression i should use for calculating Session duration ??

1 Solution

Accepted Solutions
MVP
MVP

See attached, it's working.

View solution in original post

10 Replies
Partner
Partner

Try this:

=interval( TIMESTAMP2 - TIMESTAMP1, 'hh:mm')

Bruno

Not applicable

its not working i have tried it ...  i have given a test QVW file please try the given expression in session duration at backend of the qvw

MVP
MVP

=Sum(Interval(@EndTime-@StartTime,'hh:mm'))

Not applicable

Hey Tresesco ,

I have tried above expression ...its not working,  i have attached a test qvw file ... please see if you can help

MVP
MVP

maybe

go to Number tab in your chart and format as Interval with format pattern hh:mm

may be like this

Regards

ASHFAQ

MVP
MVP

See attached, it's working.

View solution in original post

Not applicable

Hi,

Script should be something like...

Load

%AttendanceDate,
Year(%AttendanceDate) as Year,
 
%FacultyID,
  
@StartTime,
  
@EndTime,
 
Date(@EndTime-@StartTime,'hh:mm') as T_Time
FROM
time.xlsx
(
ooxml, embedded labels, table is Sheet1);

And you expression ...

sum(T_Time)

Change to number format "interval"

Vinay


Hi,

did you checked my file?

Regards

ASHFAQ