---
schema_version: "1"
id: 8170c3a71895e3083a0958b79f60c5e3e2fe60bcb12b5fb671aa6d771d245806
title: date
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_date.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_date.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c571d107e3251a5621d73a802bf0fd12aeb137290de609bf52b3e844b6e80914
description: Converts a string into a Date data type in Salesforce Spiff. This function finds the date value for a field that isn't specifically a Date data type so that Spiff can use the date value in calculations and other functions related to dates.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# date

Converts a string into a Date data type in Salesforce Spiff. This function finds the date value for a field that isn't specifically a Date data type so that Spiff can use the date value in calculations and other functions related to dates.

### 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

```
date(string)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| string | Required | A string representation of a date in the YYYY-MM-DD format, enclosed in double quotes. For a summary calculation, manually enter a date or reference a field that contains date values. |

## Considerations

If you have a date field but Spiff interprets the field's data type as a String, change the data type of the field directly to Date instead of using the `date()` function.

## Example

Indicate that plan assignment custom field, named RampStartDate, is a date.

```
=date(plan_assignment.RampStartDate)
```

Create a data filter that returns only deals with close dates after January 1, 2025, and convert the hard-coded date in text format to a date value.

```
CloseDate > date("2025-01-01")
```

Convert the CreatedDate time stamp, which is a Date & Time value, to only a Date value.

```
=date(CreatedDate)
```