# DAYOFYEAR

Extracts the day of the year from a date.

## Syntax

```
DAYOFYEAR (dateobj)

```

## Arguments

* dateobj: a valid date, datetime, or parsable date string.

## Return Type

Integer. If dateobj is not a valid date, returns NULL.

## Examples

```sql
SELECT DAYOFYEAR('2014-04-18');

```

```output

+-------------------------+
| DAYOFYEAR('2014-04-18') |
+-------------------------+
|                     108 |
+-------------------------+

```

***

Modified at: May 31, 2023

Source: [/cloud/reference/sql-reference/date-and-time-functions/dayofyear/](https://docs.singlestore.com/cloud/reference/sql-reference/date-and-time-functions/dayofyear/)

(An index of the documentation is available at /llms.txt)
