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

Returns the number of the calendar month 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

```
month(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 month for July 21, 2024. The return value is `7`.

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

Return the number of the calendar day based on CloseDate.

```
=month(CloseDate)
```

![An example of the month 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_month.png)

In another example, maybe you want to create a statement calculation that returns `true` if the period is an even month.

```
=month(statement_period.start_date) = 2 OR
month(statement_period.start_date) = 4 OR
month(statement_period.start_date) = 6 OR
month(statement_period.start_date) = 8 OR
month(statement_period.start_date) = 10 OR
month(statement_period.start_date) = 12
```

![Formula that returns true if the statement period month is even](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_functions_month_even.png)

To simplify this formula, add the `mod()` function, which determines whether the result of the `month()` function is divisible by 2.

```
=mod(month(statement_period.start_date), 2) = 0
```