We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully reproducible code snippet Code:
import sqlglot from sqlglot import transpile print(sqlglot.__version__) sql = """ SELECT DATEDIFF(days, '2021-01-01', '2021-02-01') """ print(transpile(sql, read='redshift',write='bigquery')[0])
Output:
25.1.0 SELECT DATE_DIFF(CAST('2021-02-01' AS DATETIME), CAST('2021-01-01' AS DATETIME), DAYS)
The date interval in the output should be DAY, not DAYS.
DAY
DAYS
Official Documentation https://count.co/sql-resources/bigquery-standard-sql/date_diff
The text was updated successfully, but these errors were encountered:
Thanks!
Sorry, something went wrong.
VaggelisD
Successfully merging a pull request may close this issue.
Fully reproducible code snippet
Code:
Output:
The date interval in the output should be
DAY
, notDAYS
.Official Documentation
https://count.co/sql-resources/bigquery-standard-sql/date_diff
The text was updated successfully, but these errors were encountered: