From 798a9f928391d69b360477fb40cc9077d96b8a8a Mon Sep 17 00:00:00 2001 From: Ben Lea <80100530+darkopia@users.noreply.github.com> Date: Fri, 7 Feb 2025 19:41:52 +0100 Subject: [PATCH] Update hogql-date-time-filters.md There was a type mismatch that meant that this approach doesn't work, I thought about wrapping both in toInt but I think this is nicer. --- contents/tutorials/hogql-date-time-filters.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contents/tutorials/hogql-date-time-filters.md b/contents/tutorials/hogql-date-time-filters.md index 1b55513a3ec3..0f80420a38a9 100644 --- a/contents/tutorials/hogql-date-time-filters.md +++ b/contents/tutorials/hogql-date-time-filters.md @@ -93,7 +93,7 @@ toStartOfWeek(timestamp) == toStartOfWeek(now()) Alternatively, if you wanted a weekly report for only weekdays, you can use [`toDayOfWeek`](https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions#todayofweek) to filter out Saturday and Sunday with their day’s number: ``` -toDayOfWeek(timestamp) != 6 and toDayOfWeek(timestamp) != 7 +toInt(toDayOfWeek(timestamp)) NOT IN (6, 7) ``` ## Analyzing subscribers or trial users @@ -128,4 +128,4 @@ This is useful to learn what features are used immediately after sign up and oth - [Running experiments on new users](/tutorials/new-user-experiments) - [The power of HogQL’s sum() aggregation](/tutorials/hogql-sum-aggregation) - \ No newline at end of file +