---
schema_version: "1"
id: 3c1ab62bc8c4aa3a9a241b4eb28855de0729e6e7b56fb790b397fdefdbb2822e
title: days_to
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_days_to.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_days_to.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: aa289bed753d2272458cb71f47fa7c4ec942d5792dec80e2bef6e3381225d864
description: Returns the number of days between two dates or times in Salesforce Spiff.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# days\_to

Returns the number of days between two dates or times in Salesforce Spiff.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</td></tr></tbody></table>

## Syntax

```
days_to(start_date, end_date)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| start\_date | Required | The lower bound of the date range. This argument supports any date functions. |
| end\_date | Required | The upper bound of the date range. This argument supports any date functions. |

## Example

Return the number of days between a deal's close date and the last day of the calendar year.

```
=days_to(CloseDate, date("2024-12-31"))
```