21.2:

```
milovidov-desktop :) SELECT CAST(1111111111.222 AS DateTime64(3))

SELECT cast(1111111111.222, 'DateTime64(3)')

Query id: d10c8623-5c74-4a38-b535-a99f6af4d28d

┌─cast(1111111111.222, 'DateTime64(3)')─┐
│               2005-03-18 04:58:31.222 │
└───────────────────────────────────────┘
```

master:

```
milovidov-desktop :) SELECT CAST(1111111111.222 AS DateTime64(3))

SELECT cast(1111111111.222, 'DateTime64(3)')

Query id: cb4af967-a4ae-4df5-89ba-234d68675f93

┌─cast(1111111111.222, 'DateTime64(3)')─┐
│               2005-03-18 04:58:31.000 │
└───────────────────────────────────────┘
```
: DateTimeTransformImpl<DataTypeInt64, DataTypeDate, ToDateTransform32Or64Signed<Int64, UInt16>> {};
template <typename Name> struct ConvertImpl<DataTypeFloat32, DataTypeDate, Name, ConvertDefaultBehaviorTag>
    : DateTimeTransformImpl<DataTypeFloat32, DataTypeDate, ToDateTransform32Or64Signed<Float32, UInt16>> {};
template <typename Name> struct ConvertImpl<DataTypeFloat64, DataTypeDate, Name, ConvertDefaultBehaviorTag>
    : DateTimeTransformImpl<DataTypeFloat64, DataTypeDate, ToDateTransform32Or64Signed<Float64, UInt16>> {};
template <typename FromType, typename ToType>
struct ToDateTimeTransform64
{
    static constexpr auto name = "toDateTime";
    static inline NO_SANITIZE_UNDEFINED ToType execute(const FromType & from, const DateLUTImpl &)
    {
        return std::min(time_t(from), time_t(0xFFFFFFFF));
    }
};
template <typename FromType, typename ToType>
struct ToDateTimeTransformSigned
{
    static constexpr auto name = "toDateTime";
    static inline NO_SANITIZE_UNDEFINED ToType execute(const FromType & from, const DateLUTImpl &)
    {
        if (from < 0)
            return 0;
        return from;
    }
};
template <typename FromType, typename ToType>
struct ToDateTimeTransform64Signed
{
    static constexpr auto name = "toDateTime";
    static inline NO_SANITIZE_UNDEFINED ToType execute(const FromType & from, const DateLUTImpl &)