doris-website icon indicating copy to clipboard operation
doris-website copied to clipboard

DATE_TRUNC Function not suppot DATE_TRUNC(<time_unit>, <datetime>)

Open liujie-yt opened this issue 1 year ago • 0 comments

https://github.com/apache/doris-website/blob/4bac4236aee6aeecc833fbea2d6e193510e04eec/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/date-time-functions/date-trunc.md?plain=1#L16

Doris 3.0.3 is not suppot DATE_TRUNC(<time_unit>, )

select date_trunc('month', OEE_DATE) from mcp.line_oee

SQL Error [1105] [HY000]: errCode = 2, detailMessage = the second parameter of date_trunc function must be a string constant: date_trunc('month', OEE_DATE)

liujie-yt avatar Jul 29 '25 08:07 liujie-yt