Choose Language Hide Translation Bar
Alicia
New Contributor

Creating a column of time intervals

I have a column containing date & time data and I would like to create a new column that calculates the time interval between the current row and the previous row?

 

For example, if I have

 

Row 1: 01/01/2019 15:00:00

Row 2: 01/01/2019 15:00:05

Row 3: 01/01/2019 15:00:12

 

then I want to create a new column that returns the values (in seconds):

 

-

5

7

 

 

Is that possible from the formula builder in JMP?

 

Many thanks for help in advance!

 

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Creating a column of time intervals

Assuming your column of Date Time values is a valid JMP Date Time column, and that for illustration purposes, the column has the name, "DateTime", the formula would be

:DateTime - Lag(:DateTime)
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Creating a column of time intervals

Assuming your column of Date Time values is a valid JMP Date Time column, and that for illustration purposes, the column has the name, "DateTime", the formula would be

:DateTime - Lag(:DateTime)
Jim

View solution in original post

Highlighted
Alicia
New Contributor

Re: Creating a column of time intervals

Work great, thanks so much!
0 Kudos