cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Alicia
Level III

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!

 

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
Alicia
Level III

Re: Creating a column of time intervals

Work great, thanks so much!