Skip to main content

Date Difference

The Date Difference task allows you find the difference between two date columns.

Quickstart

Let us start with this data as an example:

StudentRegisteredGraduated
Alice23-April-201225-April-2015
Bob24-April-201126-April-2014
Mike26-April-201027-April-2016

The goal is to find the time it took for the students to graduate. Complete the following steps:

  1. Go to Transform > Date Function category.
  2. Select the Calculate Date Difference option from the list.
  1. Next, choose the Registered column as the Start date
  2. Choose the Graduated column as the End date
  3. Choose Years when choosing the option for Save results as
  4. Enter Years Taken in the New column name
  5. Click APPLY

We should end up with something like this:

StudentRegisteredGraduatedYears Taken
Alice23-April-201225-April-20153
Bob24-April-201126-April-20143
Mike26-April-201027-April-20166

Supported Options

The Date Difference function supports the following options:

  • Start Date: Refers to the start date column which will get subtracted from the end date column.
  • End Date: Refers to the end date column from which the start date column will be subtracted.
  • Save result as: Specifies the unit of measurement for the resulting difference column. You can choose a unit starting from 'Seconds' up to 'Years'.
note
  • The outputs produced are always integers.
  • The system will round down when calculating the date difference. This means, if the dates are apart by say 1 year and 300 days, the system will simply consider the date difference to be just 1 year.