datetime_transform toSecond toMinute toHour toDayOfWeek toDayOfMonth toDayOfYear toMonth toQuarter toYear toISOWeek toISOYear toStartOfMinute toStartOfFiveMinute toStartOfFifteenMinutes toStartOfHour toStartOfDay toDate toMonday toStartOfMonth toStartOfQuarter toStartOfYear toStartOfISOYear toTime toRelativeYearNum toRelativeMonthNum toRelativeWeekNum toRelativeDayNum toRelativeHourNum toRelativeMinuteNum toRelativeSecondNum toYYYYMM toYYYYMMDD toYYYYMMDDhhmmss timeSlot toRelativeQuarterNum toStartOfTenMinutes toUnixTimestamp date_transform toDayOfWeek toDayOfMonth toDayOfYear toMonth toQuarter toYear toISOWeek toISOYear toDate toMonday toStartOfDay toStartOfMonth toStartOfQuarter toStartOfYear toStartOfISOYear toRelativeYearNum toRelativeMonthNum toRelativeWeekNum toRelativeDayNum toYYYYMM toYYYYMMDD toYYYYMMDDhhmmss toRelativeQuarterNum toUnixTimestamp time_zone UTC Europe/Moscow Asia/Kolkata binary_function lessOrEquals less greater greaterOrEquals equals notEquals plus minus addDays addHours addMinutes addMonths addQuarters addSeconds addWeeks addYears subtractDays subtractHours subtractMinutes subtractMonths subtractQuarters subtractSeconds subtractWeeks subtractYears SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {datetime_transform}(t, '{time_zone}')) SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDate('2017-01-01') + number % 1000 + rand() % 10 AS t, {date_transform}(t)) SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {binary_function}(t, 1)) SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, toStartOfInterval(t, INTERVAL 1 month)) SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, date_trunc('month', t))