How to do this, in 3 steps:
C:\> SQLCMD
1> select convert(datetime,'20200915114000' )
2> go
Msg 241, Level 16, State 1, Server ZES, Line 1
Conversion failed when converting date and/or time from character string.
1> select convert(datetime,'20200915 114000' )
2> go
Msg 242, Level 16, State 3, Server ZES, Line 1
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
1> select convert(datetime,'20200915 11:40:00' )
2> go
-----------------------
2020-09-15 11:40:00.000
(1 rows affected)
1>
Conclusion you need to add a space and 3 ':' in the string to convert '20200915114000'
to '20200915 11:40:00'
. After this a simple CONVERT will do the trick.