Additional SQL Server features and topics not covered by specific categories
I find that
SELECT CONVERT(datetime, '20221114', 103)
also works. To note here is that YYYYMMDD is a "safe" format which is always interpreted in the same way.
I guess that the conversion considers all formats, no matter the code. But if the format is an ambiguous one, the style code is used to force the interpretation. For instance:
SELECT CONVERT(datetime, '2022-04-06', 103)
returns 2022-06-04 00:00:00.000. Because with dmy format, SQL Server interprets this format as ydm.
By the way, I did not now that the format 01JAN2022 (without any spaces) would convert at all!