Find the date difference between rows

Data Pipeline

In the event where you only have one date column but would like to calculate the difference between date rows, you can create an additional column to use as a start date in order to use the datediff formula. In the example below, we are looking to calculate the number of days between login times.

Column to view login times

  1. After pulling in the column containing the login dates, add a new column in the data pipeline (here called ‘Signed On 2’) with the Formula Type “Lag” and a Row Offset of 1.

Add a column in the Pipeline

  1. Create a new column calculating the number of days between login dates using the datediff() formula below:

datediff(“DateColumn1”, “DateColumn2”, ‘unit’ (optional))

Add a column and use the datediff() Custom formula

You now have the number of days between login dates and can perform additional calculations as needed.

Read more about date calculations in the data pipeline.

Related Data Pipeline Help Articles

See more