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 │
└───────────────────────────────────────┘
```
if (to_nullable && WhichDataType(from_type).isStringOrFixedString())
                done = callOnIndexAndDataType<ToDataType>(from_type->getTypeId(), call, ConvertReturnNullOnErrorTag{});
            else
                done = callOnIndexAndDataType<ToDataType>(from_type->getTypeId(), call, ConvertDefaultBehaviorTag{});
        }
        if (!done)
        {
            
            if (std::is_same_v<ToDataType, DataTypeString>)
            {
                return ConvertImplGenericToString::execute(arguments);
            }
            else
                throw Exception("Illegal type " + arguments[0].type->getName() + " of argument of function " + getName(),
                    ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        }
        return result_column;
    }
};
/** Function toTOrZero (where T is number of date or datetime type):
  *  try to convert from String to type T through parsing,
  *  if cannot parse, return default value instead of throwing exception.
  * Function toTOrNull will return Nullable type with NULL when cannot parse.
  * NOTE Also need to implement tryToUnixTimestamp with timezone.
  */
template <typename ToDataType, typename Name,
    ConvertFromStringExceptionMode exception_mode,
    ConvertFromStringParsingMode parsing_mode = ConvertFromStringParsingMode::Normal>
class FunctionConvertFromString : public IFunction