v.24.3New Feature

Added toMillisecond Function for DateTime Types

Added function toMillisecond which returns the millisecond component for values of typeDateTime or DateTime64. #60281 (Shaun Struwig).
Added the toMillisecond function to extract the millisecond component from DateTime and DateTime64 values.

Why it matters

This function provides users the ability to retrieve the millisecond part of datetime values, which is useful for precise time analysis and processing where millisecond granularity is required.

How to use it

Use the toMillisecond function by passing a DateTime or DateTime64 column or value as an argument. Example:

SELECT toMillisecond(your_datetime_column) FROM your_table;