# DAYS\_IN\_YEAR

| **Description** | The **`DAYS_IN_YEAR()`** function calculates and returns the number of days in a year for a given date, accounting for leap years. This is useful for various date-based calculations, such as determining the duration of a year with proper consideration for leap years. |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Syntax**      | DAYS\_IN\_YEAR(**`date`**)                                                                                                                                                                                                                                                  |

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

## Example

### Table

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

### Function

```
DAYS_IN_YEAR(`Event Date`)
```

### Results

| DAYS\_IN\_YEAR (integer) |
| ------------------------ |
| 365                      |
| 366                      |
| 365                      |
| 365                      |
