The Compare dates step compares dates in a column to another column of dates, or compares dates in a column against the current time when your Parabola flow runs. This step is similar to the DATEDIF function in Excel by creating a new column showing the measurement of time between two dates.
The data you connect to this step needs at least one column with date information. In this example, we pass a column called "Sales Date" and compare that date against "current time". The step provides an output of a column auto-named "Difference" showing us the number of days between "Sales Date" and "current time".
By default, this step will add a new column called "Difference" and find the number of Hours between an auto-selected column that has the word "date", auto-selects your local timezone, and subtracts current time from this date column (in the below example, this auto-selected the column "Sales Date").
Select which time unit measurement you'd like to perform calculations with.
The “weekdays” option will calculate the number of week days (excluding weekends) between the two dates, akin to the NETWORKDAYS function in Excel.
If your data has a timezone different from your current location's, you can indicate that in the step.
If you have a column with dates data you'd like to perform these calculations on, you may select that instead of the default current time option.
- Date formatting: we suggest formatting your dates either as YYYY-MM-DD HH:mm:ss or X (Unix) for this step. You can use the Format dates step to get your date values in one of these formats.
- Working with two-digit years (YY): by default, we determine the century by using a cutoff year of 2029. That means that two-digit years between “00-29” will be interpreted as the years between 2000-2029, and two-digit years between “30-99" will be interpreted as the years between 1930-1999.
- If any of the values being compared can't be recognized as a date or date-time, then the result will be blank for that row. Otherwise the output is always a number.