Introduction

One of the key goals of recent ClickHouse® releases has been improving compatibility with the ANSI SQL standard. While ClickHouse has always offered a rich set of date and time functions, some syntax differences compared to traditional relational databases required developers to modify existing SQL queries during migrations.

A common example was retrieving the current date or timestamp. Earlier versions of ClickHouse relied on function calls such as today() and now(), whereas many popular databases use SQL-standard keywords like CURRENT_DATE and CURRENT_TIMESTAMP.

ClickHouse® 26.3 bridges this gap by introducing support for SQL-standard time functions without parentheses. Although this may seem like a small enhancement, it significantly improves portability for applications, BI tools, reporting platforms, and ORMs that generate ANSI SQL.

In this article, we'll explore what's new, how these functions work, and why this seemingly simple feature makes migrating workloads to ClickHouse much easier.


Why SQL Compatibility Matters

Organizations rarely build analytics platforms from scratch.

Many migrate workloads from databases such as:

  • PostgreSQL
  • MySQL
  • SQL Server
  • Oracle
  • Snowflake

These systems generally follow ANSI SQL syntax for obtaining the current date and timestamp.

For example:

SELECT CURRENT_DATE;

SELECT CURRENT_TIMESTAMP;

Enter fullscreen mode Exit fullscreen mode

Prior to ClickHouse® 26.3, these queries required modification before they could run successfully.

Even small syntax differences become significant when migrating:

  • Thousands of SQL queries
  • BI dashboards
  • Stored reports
  • ORM-generated SQL
  • Data transformation pipelines

Reducing these incompatibilities simplifies migrations and improves developer productivity.


Before ClickHouse® 26.3

Traditionally, ClickHouse used dedicated functions.

SELECT today();

SELECT now();

Enter fullscreen mode Exit fullscreen mode

These functions remain fully supported and continue to be the recommended native ClickHouse approach.

However, applications written for ANSI SQL databases often expected keyword-based syntax instead.


What's New in ClickHouse® 26.3?

ClickHouse® 26.3 introduces support for several SQL-standard temporal keywords without requiring parentheses.

Supported syntax includes:

SELECT CURRENT_DATE;

Enter fullscreen mode Exit fullscreen mode

SELECT CURRENT_TIMESTAMP;

Enter fullscreen mode Exit fullscreen mode

SELECT NOW;

Enter fullscreen mode Exit fullscreen mode

These expressions behave exactly like their ClickHouse counterparts while following the SQL standard used by many other database systems.


Function Comparison

SQL Standard Traditional ClickHouse® Supported in 26.3
CURRENT_DATE today() ✅ Yes
CURRENT_TIMESTAMP now() ✅ Yes
NOW now() ✅ Yes (without parentheses)

These additions provide alternative syntax—they do not replace existing ClickHouse functions.


Examples

Current Date

SELECT CURRENT_DATE;

Enter fullscreen mode Exit fullscreen mode

Equivalent native ClickHouse syntax:

SELECT today();

Enter fullscreen mode Exit fullscreen mode

Example output:

2026-03-18

Enter fullscreen mode Exit fullscreen mode


Current Timestamp

SELECT CURRENT_TIMESTAMP;

Enter fullscreen mode Exit fullscreen mode

Equivalent ClickHouse function:

SELECT now();

Enter fullscreen mode Exit fullscreen mode

Example output:

2026-03-18 14:35:12

Enter fullscreen mode Exit fullscreen mode


NOW Without Parentheses

Before ClickHouse® 26.3:

SELECT now();

Enter fullscreen mode Exit fullscreen mode

Now you can simply write:

SELECT NOW;

Enter fullscreen mode Exit fullscreen mode

Both statements return the same current timestamp.


Why This Matters for Migrations

Many migration projects involve moving hundreds or thousands of SQL statements from existing analytical databases into ClickHouse.

Consider a PostgreSQL query:

SELECT
    CURRENT_DATE,
    CURRENT_TIMESTAMP;

Enter fullscreen mode Exit fullscreen mode

Earlier versions required rewriting this as:

SELECT
    today(),
    now();

Enter fullscreen mode Exit fullscreen mode

With ClickHouse® 26.3, the original SQL can often run unchanged.

This reduces migration effort while improving compatibility with third-party SQL generators.


Better Support for BI Tools

Many reporting platforms automatically generate ANSI SQL.

Examples include:

  • Apache Superset
  • Metabase
  • Tableau
  • Power BI
  • Looker
  • JDBC-based reporting tools

Because these tools frequently generate CURRENT_DATE or CURRENT_TIMESTAMP, ClickHouse now accepts these expressions without requiring query modifications.

This helps reduce compatibility issues during deployment.


Existing Date and Time Functions Remain Available

It's important to note that ClickHouse® 26.3 does not introduce a new date-time engine.

All existing functions remain available, including:

  • today()
  • now()
  • toDate()
  • toDateTime()
  • dateDiff()
  • dateAdd()
  • toStartOfMonth()
  • toStartOfDay()
  • toStartOfWeek()
  • toStartOfHour()

The new feature simply adds SQL-standard alternatives for retrieving the current date and timestamp.


Benefits

Feature Benefit
CURRENT_DATE ANSI SQL compatibility
CURRENT_TIMESTAMP Easier query portability
NOW without parentheses Familiar syntax for SQL users
Reduced query rewrites Faster database migrations
Better ORM compatibility Less application code modification
Improved BI tool support Greater interoperability

Best Practices

To get the most from this enhancement:

  • Use SQL-standard syntax when writing portable SQL that may run across multiple database systems.
  • Continue using native ClickHouse functions if your environment is already optimized around them.
  • When migrating applications, test existing SQL before rewriting—it may now work without changes.
  • Validate ORM-generated SQL after upgrading to ClickHouse® 26.3, as many generated queries may become compatible automatically.
  • Keep using ClickHouse's rich date and time functions for advanced analytical workloads, as these remain the primary tools for date manipulation.

What Didn't Change

Although the syntax is new, the underlying behavior is not.

These additions:

  • Do not change how ClickHouse calculates dates or timestamps.
  • Do not replace existing functions such as today() or now().
  • Do not introduce new time zones or formatting options.
  • Do not affect performance compared to their native equivalents.

The primary goal is better SQL compatibility, making ClickHouse easier to adopt for teams migrating from other database platforms.


Final Thoughts

Not every new feature needs to be a major performance optimization or a groundbreaking capability. Sometimes, small improvements can have a significant impact on developer experience.

The addition of CURRENT_DATE, CURRENT_TIMESTAMP, and NOW without parentheses in ClickHouse® 26.3 is one such enhancement. By embracing ANSI SQL syntax, ClickHouse reduces friction for organizations migrating from traditional relational databases and improves compatibility with BI tools, ORMs, and SQL-generating applications.

Existing ClickHouse functions like today() and now() remain fully supported, giving developers the flexibility to choose the syntax that best fits their workflows. For teams building portable SQL or modernizing existing analytics platforms, this update makes the transition to ClickHouse just a little smoother—and that's a meaningful improvement in itself.


References

  • ClickHouse® 26.3 Release Notes
  • ClickHouse® Documentation – Date and Time Functions
  • ANSI SQL Standard – Date and Time Expressions