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

# dayofyear

> 返回指定日期为对应年中的哪一天。

计算指定日期为对应年中的哪一天。

参数为 DATE 或 DATETIME 类型。

## 语法

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

## 示例

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


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