v.18.14New Feature

Added formatDateTime Function by Alexandr Krasheninnikov

Added the formatDateTime function. Alexandr Krasheninnikov
Added the formatDateTime function to format DateTime values as strings according to a specified format.

Why it matters

The formatDateTime function addresses the need to convert DateTime values into human-readable string representations with customizable formatting. This enhances the flexibility of date and time presentation in query results, improving readability and usability for reporting and analysis.

How to use it

Use the formatDateTime function in queries by passing a DateTime value and a format string as parameters. For example:

SELECT formatDateTime(event_time, '%Y-%m-%d %H:%M:%S') FROM events;