---
title: month()
slug: month
docTags: 
createdAt: 2021-09-14T17:47:18.000Z
---

Returns the ordinal number of the month of a particular date, from 1-12, where 1 is January, 2 is February, and so on.

### Syntax

`month(date)`

- `date` - the `Date` value to be evaluated by the function.
- **Return type:** [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)&#x20;

### Sample usage

`month('2020-05-12')` returns `5`.

### Supported data types

| **Input type**                           | **Return type**                         | **Logic**                                                                                          |
| ---------------------------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------- |
| ****[Date](docId\:xTAQdzvLBTAKjxRnpFwe9) | [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)  | If a `Date` value is passed, the ordinal number of the month will be returned as a `Number` value. |
| *Unsupported data types*                 | **[Null](docId\:N9trVqonnBknqL9DrNBP6)  | Unsupported data types return `Null`.                                                              |

