Skip to content

Conversation

fivetran-BradfordPaskewitz
Copy link
Collaborator

Documentation: https://docs.snowflake.com/en/sql-reference/functions/date_part

Platform Support:
Platform | Supported | Argument Type | Return Type
Snowflake | Yes | DATE_PART(part, date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIMESTAMP/STRING | INTEGER
BigQuery | Yes (equivalent: EXTRACT) | EXTRACT(part FROM date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIMESTAMP | INTEGER
Redshift | Yes | DATE_PART(part, date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIMESTAMP | INTEGER
PostgreSQL | Yes | DATE_PART(part, date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIMESTAMP | DOUBLE PRECISION
Databricks | Yes (equivalent: EXTRACT/date_part) | date_part(part, date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIMESTAMP | INTEGER
DuckDB | Yes (equivalent: EXTRACT/date_part) | date_part(part, date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIMESTAMP | INTEGER
TSQL | Yes (equivalent: DATEPART) | DATEPART(part, date_or_timestamp) -part: STRING -date_or_timestamp: DATE/TIME/TIMESTAMP | INTEGER

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only need the parser modifications to handle FROM.

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple more suggestions. LGTM otherwise, feel free to merge when addressed.

@georgesittas georgesittas merged commit e9cf146 into main Oct 13, 2025
7 checks passed
@georgesittas georgesittas deleted the brad/snowflake_date_part branch October 13, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants