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
a function should return the number of the full units ( age in years, ...)
SELECT toDate('2022-01-01') AS e, toDate('2021-12-29') AS s, dateDiff('month', s, e) AS month__diff, dateDiff('year', s, e) AS year_diff ┌──────────e─┬──────────s─┬─month__diff─┬─year_diff─┐ │ 2022-01-01 │ 2021-12-29 │ 1 │ 1 │ └────────────┴────────────┴─────────────┴───────────┘
SELECT toDate('2022-01-01') AS e, toDate('2021-12-29') AS s, age('month', s, e) AS month__diff, age('year', s, e) AS year_diff ┌──────────e─┬──────────s─┬─month__diff─┬─year_diff─┐ │ 2022-01-01 │ 2021-12-29 │ 0 │ 0 │ └────────────┴────────────┴─────────────┴───────────┘
CREATE FUNCTION age AS (e, s) -> (dateDiff('year', s, e) - ((month(s), day(s)) > (month(e), day(e)))) SELECT age(toDate('2022-01-01'), toDate('2021-12-29')) AS age ┌─age─┐ │ 0 │ └─────┘
The text was updated successfully, but these errors were encountered:
PR was reverted.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
a function should return the number of the full units ( age in years, ...)
The text was updated successfully, but these errors were encountered: