# Compute duration

The Compute duration step allows to compute the duration (in days, hours, minutes or seconds) between 2 dates in a new column.

### Step parameters

* `New column name`**(string\*)**: the new column to be created for the computation result
* `Start date column` **column(string)\***: the starting date
* `End date column` **column(string)\***: the ending date
* `Duration in` **(integer)\*:** the duration units (days, hours, minutes or seconds)

### Example

**Input**

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-ea19e8d8b6bc18b5733e8e4fdeaaa142b1d47387%2Fdate_uat.png?alt=media" alt=""><figcaption><p>Date - compute duration</p></figcaption></figure>

**Configuration**

```json
{
  "new_column_name": "compute_duration",
  "start_date_col": "start_date",
  "end_date_col": "end_date",
  "duration_in": "days",
}

```

**Output**

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-debcd84299ef97b4cf9802b846724d6d2d588cc3%2Fdate_compute-duration.png?alt=media" alt=""><figcaption><p>Date - compute duration output</p></figcaption></figure>
