My problem is I want to add three dates that are in datetime format in sql.
these date variables are in an SP and when sending the information manually in sql server:
exec spInsertaCargoCobranzaMV '00024','002',21554,1,0,500.00,'5-19-2017',1,-6,0,'12-12-2017','12-12-2018','SIMBANK','a3addaffedc7068e','20.6909728','-100.4432175'
I get the following error
Error al convertir el tipo de datos varchar a datetime.
Also try to execute the sp as follows:
exec spInsertaCargoCobranzaMV '00024','002',21554,1,0,500.00,'5/19/2017',1,-6,0,'12/12/2017','12/12/2018','SIMBANK','a3addaffedc7068e','20.6909728','-100.4432175'
Also in this other way:
exec spInsertaCargoCobranzaMV '00024','002',21554,1,0,500.00,'5-19-2017 12:00:00 AM',1,-6,0,'12-12-2017 12:00:00 AM','12-12-2018 12:00:00 AM','SIMBANK','a3addaffedc7068e','20.6909728','-100.4432175'