apache / apache/doris-website

date_trunc('year', '2025-04-28 12:12:12');这样用为什么会报错,文档不是写的两种方式都行吗?

Open
#2,339 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
133
Forks
464
Avg merge
1d 1h
Merged PRs (30d)
50

Description

Path:/zh-CN/docs/sql-manual/sql-functions/scalar-functions/date-time-functions/date-trunc

![Image](https://github.com/user-attachments/assets/543946ad-a33d-47fe-be82-a7ac5d007ea6)
如题,date_trunc('year', '2025-04-28 12:12:12')使用date_trunc函数会报错,但是文档却说两种方式都行?
`SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = date_trunc function second param only support argument is year|quarter|month|week|day|hour|minute|second`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.