--DATEPART Function The DATEPART function returns an integer representing the specified part (year, month, day, etc.) of a given date. -- Extract the year, month, and day from a date SELECT ...
Sqlglot is switching date_trunc to timestamp_trunc upon parsing, which is not a valid Snowflake sql function. It is also switching the argument order and unquoting the date part where it shouldn't do ...