Questions tagged [time-difference]

11 questions
2
votes
2 answers

Subtract consecutive rows based on binary condition

I have a dataframe like below: data={'time':['2021-01-01 22:00:12','2021-01-05 22:49:12','2021-01-06 21:00:00','2021-01-06 23:59:15','2021-01-07 05:00:55','2021-01-07 12:00:39'], …
1
vote
1 answer

Time duration between 2 DateTime columns EXCLUDE out of office hours - SQL BigQuery

I have a task requiring tracking SLA times. The aim is to exclude out of hours time from the total SLA time to get a true/fair SLA time. Parameters: Working hours for tasks are between 08:00:00 and 14:00:00 (6 hour open window). Any time outside of…
1
vote
2 answers

MySQL automatically calculate the hour difference between two TIME values with decimal places

My table has the following columns Column Data type (PK) table_id INT AUTO_INCREMENT start_time TIME end_time TIME duration DECIMAL(10,2) When someone adds a row to this table, I want it to calculate the difference in hours between…
0
votes
0 answers

SQL Complex Time Difference Calculation by Specific Task ID

This is the first time I've ever posted in StackOverflow. I've used it for years and it's been a reliable source, but I think I've finally encountered a complex enough issue worth posting about. Here's what I have. We need to calculate the time…
0
votes
0 answers

Subtract two times to get a duration in luxon in Qualtrics

In my Qualtrics survey, respondents provide two times in two separate text entry questions on the same page: a time they got in bed (“11:30 PM”) and a time they got out of bed (“8:00 AM”). I need to calculate the number of minutes between these two…
0
votes
0 answers

InfluxDB and Flux: What's the easiest way to calculate time differences between data points in a series?

How to get time differences of data points of a series of influxdb data? I have found the following working method, but it seams awfully inefficient. Is there a more simple way to do it? Explanation: after selecting my series with filters, I replace…
phu
  • 43
  • 4
0
votes
0 answers

Python check when second columns value changes based on first column value change

I would like to be able to find out what time it takes for the values in one column to change, based on when the value changes in another column. I have loaded an example of the table below. | 23-02-03 12:01:27.213000 | 60 | 0 | | 23-02-03…
thewal
  • 75
  • 6
0
votes
3 answers

is there any solution to find the time span between two time duration

I have two times like 100:45 and 395:50 I need to find the subtraction and addition between these two times in the asp.net web application I will expect like this 100:45+395:50=496:35 and 100:45-395:50=295:05
-1
votes
2 answers

Carbon/PHP causing diffInMonths to return the wrong value when February is involved

I am trying to determine the difference in months between the date the user is created and the current date. However, if any of the date involves february it will result in the difference being returned to potentially be wrong. Instead of returning…
Yeo Bryan
  • 331
  • 4
  • 24
-1
votes
1 answer

Calculating Time Difference between Each Users Attempt

I have table in my Oracle database (v12.2.0.2.1) that tracks a users attempt to register an event and the timestamp of that attempt. The question I am trying to answer is the time difference between each users attempt. The original table looks…
Mike
  • 4,099
  • 17
  • 61
  • 83