galera, estou tentando fazer uma consulta no protheus atraves do banco com a seguinte query
select e5_data,e5_dtdispo,e5_valor,r_e_c_n_o_ recnose5,
datediff(day, convert(datetime , e5_data, 103), convert(datetime, '20201109', 103))
from se5010 b
where e5_data <= '20201110'
and datediff(day, convert(datetime , b.e5_data, 103), convert(datetime, '20201109', 103)) <= 240
and d_e_l_e_t_ = ' '
and (e5_tipodoc in ('ca','ch') or (e5_tipodoc = 'pa' and e5_numcheq <> ' ') or
(e5_tipodoc ='tr' and e5_moeda ='ch') )
and e5_banco + e5_agencia + e5_conta not in
(select a6_cod+ a6_agencia+ a6_numcon
from sa6010 where a6_cod in ('002','011','012','014','015','016','017','022','023','024','025','026','027','028','029','030','031','033','034')
or (a6_cod ='237' and a6_agencia ='3484' and a6_numcon = '0460') or
(a6_cod ='001' and a6_agencia = '3392' and a6_numcon = '5815') or (a6_cod='409' and a6_agencia='0491' and a6_numcon ='.') )
and e5_reconc <> 'x' and e5_situaca <> 'c' and e5_numcheq not in(select a.e5_numcheq from se5010 a where
a.d_e_l_e_t_ = ' ' and a.e5_naturez = 'ntchest' and a.e5_numcheq = b.e5_numcheq and a.e5_tipodoc = 'ec' and
b.e5_banco = a.e5_banco and b.e5_agencia = a.e5_agencia and b.e5_conta = a.e5_conta)
order by e5_data, e5_dtdispo
o erro abaixo aparece e nao sei o que fazer poderiam me ajudar?
mensagem 241, nível 16, estado 1, linha 1
conversion failed when converting date and/or time from character string.
desde ja agradeço