1 Reply Latest reply on Dec 26, 2018 9:39 AM by Patrick Van Der Hyde

# Time and Date Calculation

Hi experts!

I need some help in calculating time and date.

I'm having a hard time calculating for shifts and total time an employee is in each rooms.

 Date Time Room Calculation Activity Name October 01, 2018 20:28:14 Break Room Valid Card Entry Employee6 October 01, 2018 20:41:02 Break Room Valid Card Entry Employee6 October 01, 2018 20:46:14 Break Room Valid Card Entry Employee6 October 01, 2018 20:49:59 Door-IN 0:21:45 Breakroom Valid Card Entry Employee6 October 01, 2018 20:50:09 Prod 0:00:10 Door-in Valid Card Entry Employee6 October 01, 2018 21:42:57 Door-OUT 0:52:48 Prod Valid Card Exit Employee6 October 01, 2018 21:43:05 Break Room 0:00:08 Door-out Valid Card Entry Employee6 October 01, 2018 21:50:25 Door-IN 0:07:20 Breakroom Valid Card Entry Employee6 October 01, 2018 21:50:34 Prod 0:00:09 Door-in Valid Card Entry Employee6 October 01, 2018 23:03:53 Door-OUT 1:13:19 Prod Valid Card Exit Employee6 October 01, 2018 23:04:00 Break Room 0:00:07 Door-out Valid Card Entry Employee6 October 01, 2018 23:08:58 Door-IN 0:04:58 Breakroom Valid Card Entry Employee6 October 01, 2018 23:09:08 Prod 0:00:10 Door-in Valid Card Entry Employee6 October 01, 2018 23:09:22 Prod 0:00:14 Prod Valid Card Entry Employee6 October 01, 2018 23:30:06 Door-OUT 0:20:44 Prod Valid Card Exit Employee6 October 01, 2018 23:30:14 Break Room 0:00:08 Door-out Valid Card Entry Employee6 October 01, 2018 23:43:27 Door-IN 0:13:13 Breakroom Valid Card Entry Employee6 October 01, 2018 23:43:36 Prod 0:00:09 Door-in Valid Card Entry Employee6 October 02, 2018 0:46:05 Door-OUT 1:02:29 Prod Valid Card Exit Employee6 October 02, 2018 0:48:34 Door-IN 0:02:29 Door-OUT Valid Card Entry Employee6 October 02, 2018 0:48:45 Prod 0:00:11 Door-IN Valid Card Entry Employee6 October 02, 2018 1:00:17 Door-OUT 0:11:32 Prod Valid Card Exit Employee6 October 02, 2018 1:00:28 Break Room 0:00:11 Door-OUT Valid Card Entry Employee6 October 02, 2018 1:43:48 Break Room 0:43:20 Break Room Valid Card Entry Employee6 October 02, 2018 1:57:46 Door-IN 0:13:58 Break Room Valid Card Entry Employee6 October 02, 2018 1:58:48 Prod 0:01:02 Door-IN Valid Card Entry Employee6 October 02, 2018 2:32:55 Door-OUT 0:34:07 Prod Valid Card Exit Employee6 October 02, 2018 2:33:04 Break Room 0:00:09 Door-OUT Valid Card Entry Employee6 October 02, 2018 2:40:40 Door-IN 0:07:36 Break Room Valid Card Entry Employee6 October 02, 2018 2:40:50 Prod 0:00:10 Door-IN Valid Card Entry Employee6 October 02, 2018 3:28:37 Door-OUT 0:47:47 Prod Valid Card Exit Employee6 October 02, 2018 3:30:15 Door-IN 0:01:38 Door-OUT Valid Card Entry Employee6 October 02, 2018 3:30:26 Prod 0:00:11 Door-IN Valid Card Entry Employee6 October 02, 2018 4:30:26 Door-OUT 1:00:00 Prod Valid Card Exit Employee6 October 02, 2018 4:30:34 Break Room 0:00:08 Door-OUT Valid Card Entry Employee6 October 02, 2018 4:43:34 Door-IN 0:13:00 Break Room Valid Card Entry Employee6 October 02, 2018 4:43:45 Prod 0:00:11 Door-IN Valid Card Entry Employee6 October 02, 2018 4:52:03 Door-OUT 0:08:18 Prod Valid Card Exit Employee6 October 02, 2018 4:52:09 Break Room 0:00:06 Door-OUT Valid Card Entry Employee6 October 02, 2018 4:52:35 Door-IN 0:00:26 Break Room Valid Card Entry Employee6 October 02, 2018 4:52:43 Prod 0:00:08 Door-IN Valid Card Entry Employee6 October 02, 2018 5:41:50 Door-OUT 0:49:07 Prod Valid Card Exit Employee6 October 02, 2018 5:41:57 Break Room 0:00:07 Door-OUT Valid Card Entry Employee6 October 02, 2018 5:45:23 Door-IN 0:03:26 Break Room Valid Card Entry Employee6 October 02, 2018 5:45:35 Prod 0:00:12 Door-IN Valid Card Entry Employee6 October 02, 2018 6:00:07 Door-OUT 0:14:32 Prod Valid Card Exit Employee6 October 02, 2018 6:00:14 Break Room 0:00:07 Door-OUT Valid Card Entry Employee6

Please disregard calculation. I just calculated it using excel.

I need to know how to get the following using tableau:

129 minutes in Breakroom

2 mins Door in

5 mins door out

434 mins prod

I'm having a hard time calculating working time if an employee works night shift.

I really appreciate any help.

Thank you.

J

• ###### 1. Re: Time and Date Calculation

Hello Joy

You did not mention which version of Tableau is in use so I saved this in version 10.2 for you.

You will need to convert the values for the activity into seconds and then back into minutes.  See attached example Sheet 1.

Patrick