📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

TO_START_OF_ISO_YEAR



Returns the first day of the ISO year for a date or a date with time (timestamp/datetime).

Syntax

TO_START_OF_ISO_YEAR(<expr>)

Arguments

ArgumentsDescription
<expr>date/timestamp

Return Type

DATE, returns date in “YYYY-MM-DD” format.

Examples

SELECT to_start_of_iso_year('2023-11-12 09:38:18.165575'); ┌────────────────────────────────────────────────────┐ │ to_start_of_iso_year('2023-11-12 09:38:18.165575') │ ├────────────────────────────────────────────────────┤ │ 2023-01-02 │ └────────────────────────────────────────────────────┘

Was this page helpful?