Date & Time calculation

Gina V

New Member
Joined
May 7, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I have 144K lines of data. My system logs a time stamp each time the employees switches to a new page. I need to add a start time at the beginning of each date and an end time at the end. EAch day could have over 7K lines of data and it's sequential, without any gaps, so I can't jump from one date to the next. Once I've added the start and end times, I need to add a calculation to pick up screen delays of more than 10 minutes.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Welcome to the forum!

To confirm, are you asking for a time difference from one row to the next?
If so, assuming your date/times (and they are date/times) are in column B starting in row 2. In cell C3, enter this formula and copy down:
Excel Formula:
=(A3-A2)*(60*24)>10
Then filter where that is TRUE.
 
Last edited:
Upvote 0
Not exactly....I have one column of dates (7K rows with the same date) and then another column with a time stamp. I need to know when the date changes from one to the next. So the first step would be to identify when the date in column A switches to the new day. Once that's done, I need to add a time at the beginning of each day (i.e. the EE's start time of 8:30) and then their end time at the end of each day. this would require the insertion of extra lines as well to accommodate the times.
 
Upvote 0
then add the day and time columns together and put in the same formula.
assuming days are in column A and times are in column B.
Excel Formula:
=((A3+B3)-(A2+B2))*(60*24)>10

PS. I have no idea what you mean about "insertion" of lines. If the dates and times are on the same row, that makes no difference.
And, the difference in time from last thing in the afternoon to first thing in the morning will be a negative number, not greater than 10 minutes.
Or are you saying there is no timestamp when they clock in or clock out?
Of course, a visual example of a date change in a table or mini sheet using xl2bb add in (link below) would be helpful.
 
Upvote 0
I just meant that I would need to add a line at the beginning to insert a start time of 08:30:00 and a line at the end to include their end time of 16:30:00. Once done, I would need to add the calculation to display the gaps in time of > 10 mins. At the moment, I'm doing this all manually and then adding a conditional format to highlight gaps over 10 minutes. I'm not able/allowed to install the program to show you the data but have included a picture

DATETIME
2024-01-0809:56:19
2024-01-0809:56:19
2024-01-0809:56:20
2024-01-0809:56:21
2024-01-0809:56:21
1,000 lines later….
2024-01-0816:07:06
2024-01-0816:07:07
2024-01-0908:52:40
2024-01-0908:52:41
2024-01-0908:52:41
2024-01-0908:52:41
 
Upvote 0
then you can use a conditional statement, checking for a change in the day.

Book1
ABC
1DATETIME
22024-01-0809:56:19
32024-01-0809:56:19FALSE
42024-01-0809:56:20FALSE
52024-01-0809:56:21FALSE
62024-01-0809:56:21FALSE
72024-01-0816:07:06TRUE
82024-01-0816:07:07FALSE
92024-01-0908:52:40TRUE
102024-01-0908:52:41FALSE
112024-01-0908:52:41FALSE
122024-01-0908:52:41FALSE
132024-01-1016:25:00TRUE
142024-01-1108:36:00FALSE
152024-01-1211:52:41TRUE
162024-01-1312:52:41TRUE
172024-01-1413:52:41TRUE
Sheet1
Cell Formulas
RangeFormula
C3:C17C3=((B3-IF(A3>A2,TIME(8,30,0),B2))*(24*60))>10
 
Upvote 0
Thanks foryour help! I will give it a try and see what happens!
 
Upvote 0

Forum statistics

Threads
1,216,109
Messages
6,128,880
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top