# DAYS\_IN\_MONTH

| REMOVE IN GITBOOK | REMOVE IN GITBOOK                                                                                                                                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Description       | The **`DAYS_IN_MONTH()`** function calculates and returns the number of days in the month for a given date or datetime. This is useful for various date-based calculations, such as determining the duration of a month. |
| Syntax            | DAYS\_IN\_MONTH(**`date`**)                                                                                                                                                                                              |

1. **`date`**: The date or datetime for which you want to calculate the number of days in the month.

## Example

### Table

| Event   | Event Date |
| ------- | ---------- |
| Event A | 2023-09-10 |
| Event B | 2023-02-25 |
| Event C | 2023-12-01 |
| Event D | 2023-04-15 |

### Function

```
DAYS_IN_MONTH(`Event Date`)
```

### Results

| DAYS\_IN\_MONTH (integer) |
| ------------------------- |
| 30                        |
| 28                        |
| 31                        |
| 30                        |
