---
schema_version: "1"
id: 2ce94be6f90494b811dc9ddc0b85bb9c00c02b9930134e6ee8786a659ddaa82e
title: day
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_day.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_day.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 817aa91b8abb02eeaac2e40271aff17114aa8a8db01cf4a9255001ac17e0ba3c
description: Returns the number of the calendar day for a specified date or time in Salesforce Spiff.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# day

Returns the number of the calendar day for a specified date or time 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

```
day(date_or_time)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| date\_or\_time | Required | The Date or Date & Time value to evaluate. This argument supports any date functions. |

## Example

Return the number of the calendar day for July 21, 2024. The return value is `21`.

```
=day("2024-07-21")
```

Return the number of the calendar day based on CloseDate.

```
=day(CloseDate)
```

![An example of the day function with CloseDate values](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_function_ref_day.png)