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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

help for desuming Time

Hi all,

i have a structure like this:

04/07/2012 10:06:47
04/07/2012 13:45:34
04/07/2012 14:42:54
04/07/2012 19:20:01
03/07/2012 14:14:12
03/07/2012 19:06:40
02/07/2012 12:54:03
02/07/2012 13:54:13
02/07/2012 18:46:19
28/06/2012 19:35:49
28/06/2012  9:49:10
28/06/2012 13:32:18
28/06/2012 14:41:18
27/06/2012 13:42:58
27/06/2012 14:26:25
27/06/2012  9:15:08
27/06/2012 19:16:15

and i would to load this structure in somethings like this:

dateentryexittime
04/07/201213:45:3419:20:015:34:27
03/07/201214:14:1219:06:404:52:28
02/07/201212:54:0318:46:195:52:16
28/06/201209:49:1019:35:499:46:39
27/06/201209:15:0819:16:1510:01:07

where entry is the min and the exit is the max of each day and time is the difference in h:mm:ss.

Can someone help me?

thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Here you go:

T1:

Load * Inline [

Date, Time

04/07/2012,10:06:47

04/07/2012,13:45:34

04/07/2012,14:42:54

04/07/2012,19:20:01

03/07/2012,14:14:12

03/07/2012,19:06:40

02/07/2012,12:54:03

02/07/2012,13:54:13

02/07/2012,18:46:19

28/06/2012,19:35:49

28/06/2012,9:49:10

28/06/2012,13:32:18

28/06/2012,14:41:18

27/06/2012,13:42:58

27/06/2012,14:26:25

27/06/2012,9:15:08

27/06/2012,19:16:15

];

T2:

Load

          Date(Date#(Date,'DD/MM/YYYY'),'DD/MM/YYYY') as Date,

          Time(Min(Time),'hh:mm:ss') as StartTime,

          Time(Max(Time),'hh:mm:ss') as EndTime,

          Interval(Max(Time)-Min(Time),'hh:mm:ss') as TimeDiff

Resident T1

group by Date;

Drop table T1;

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Here you go:

T1:

Load * Inline [

Date, Time

04/07/2012,10:06:47

04/07/2012,13:45:34

04/07/2012,14:42:54

04/07/2012,19:20:01

03/07/2012,14:14:12

03/07/2012,19:06:40

02/07/2012,12:54:03

02/07/2012,13:54:13

02/07/2012,18:46:19

28/06/2012,19:35:49

28/06/2012,9:49:10

28/06/2012,13:32:18

28/06/2012,14:41:18

27/06/2012,13:42:58

27/06/2012,14:26:25

27/06/2012,9:15:08

27/06/2012,19:16:15

];

T2:

Load

          Date(Date#(Date,'DD/MM/YYYY'),'DD/MM/YYYY') as Date,

          Time(Min(Time),'hh:mm:ss') as StartTime,

          Time(Max(Time),'hh:mm:ss') as EndTime,

          Interval(Max(Time)-Min(Time),'hh:mm:ss') as TimeDiff

Resident T1

group by Date;

Drop table T1;

Not applicable
Author

Great!! It work very fine!

Now i'm complicating the structure becouse i would subtrac the time of lunch that is in the middle of the date: 13:45 to 14:42.

04/07/2012,10:06:47

04/07/2012,13:45:34

04/07/2012,14:42:54

04/07/2012,19:20:01

I'm trying, but this is my first app in qlickview...

Thank you!!