---
title: "Calculate Difference between Two Dates in Stackby"
description: "Quickly calculate the difference between two dates to track timelines, deadlines, and durations with ease."
url: https://help.stackby.com/es/articles/37-calculate-difference-between-two-dates-in-stackby
collection: "Using Formulas"
updated: 2025-04-24
language: es
alternates: [en]
---

# Calculate Difference between Two Dates in Stackby

Quickly calculate the difference between two dates to track timelines, deadlines, and durations with ease.

You can find the difference between two dates using **DATE\_DIFF formula function** in Stackby.

-   **Learn about the complete formula guide here**
    
-   **Learn about advanced formula guide here**
    

## **Understanding the DATE\_DIFF() function with examples**

Using the **DATE\_DIFF() function** in the example below, we'll find the difference - in days - between two dates.

```javascript
DATE_DIFF({Start Date}, {End Date}, "days") 
```

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/275996df70fbdb98ef21150be4cb812be89b8149305cca1663f3ad1666c514fdScreenshot%202021-03-03%20at%206.01.19%20PM.png)

Another common use of DATE\_DIFF() is to find the difference between a record's date and today's date. You can use DATE\_DIFF() in combination with the TODAY() formula to dynamically find the difference from today's date.

```javascript
DATE_DIFF(TODAY(), {End Date}, "days") 
```

Using the **DATE\_DIFF() function** in the example below, we'll find the difference - in minutes - between two dates.

```javascript
DATE_DIFF({Start Date}, {End Date}, "minutes") 
```

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/fbcbbebb63a4058f5f27054a2feac075b29934eeb0613b5748bf4a1df3f2bcfeScreenshot%202021-03-03%20at%207.12.49%20PM.png)

Using the **DATE\_DIFF() function** in the example below, we'll find the difference - in seconds - between two dates.

```javascript
DATE_DIFF({Start Date}, {End Date}, "seconds")
```

![](https://d258lu9myqkejp.cloudfront.net/attachment_images/fd50d8d8a90bdebc87ba41f9ce857ceddffa1ac37a64ef80314e28ee9aedcf5cScreenshot%202021-03-03%20at%207.13.33%20PM.png)

## Displaying Date in Time Format

If you need to measure the time an employee spends working each day, you could create two date columns to track their clock-in and clock-out times.

You can also display the output in the time format, per the formula below:

```javascript
DATE_DIFF({Clock out},{Clock in},"seconds")/60
```

![](https://staticfiles.gleap.io/ghelparticle/EZ0IY6TW1RwQq0A7vNjRQMwAnVlua0etkIVOAT7LdLQWDpyRKp1YJfaOwjQN9JrS7MNbQHrmOKa.png)
