create table #temp (col1 varchar(200))
insert #temp values ('abcd_efgh_stry_2018-11-02.xml'),('ghjk_tfgh_2018-11-02.xml')
select *,convert(date,substring(col1,patindex('%[0-9]%',col1),patindex('%.xml%',col1)-patindex('%[0-9]%',col1)))
from #temp
create table #temp (col1 varchar(200))
insert #temp values ('abcd_efgh_stry_2018-11-02.xml'),('ghjk_tfgh_2018-11-02.xml')
select *,convert(date,substring(col1,patindex('%[0-9]%',col1),patindex('%.xml%',col1)-patindex('%[0-9]%',col1)))
from #temp