> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# dayofyear

> Returns the day of the year for a given date.

Returns the day of the year for a given date.

The `date` parameter must be of the DATE or DATETIME type.

## Syntax

```Haskell theme={null}
INT DAYOFYEAR(DATETIME|DATE date)
```

## Examples

```Plain Text theme={null}
MySQL > select dayofyear('2007-02-03 00:00:00');
+----------------------------------+
| dayofyear('2007-02-03 00:00:00') |
+----------------------------------+
|                               34 |
+----------------------------------+
```

## keyword

DAYOFYEAR


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.