3
I have the following case, I’m trying to convert the one field date
for datetime
using the update
update tb_RHContratos
set DtCadastro = cast(DtCadastro as datetime)
But some of the date this does not format properly as are many record gets hard to identify which date is wrong.
I have the following msg error
Message 242, Level 16, Status 3, Line 13 The conversion of a type of date data in a type of datetime data resulted in a value outside the interval. The instruction has been completed
It has how to identify which date is out of range with a select or something?
What kind of
DtCadastro
?– Leonel Sanches da Silva
I made an import of the mysql data to sqlserver, but need converts to datetime.
– Marco Souza
managed to find one of the wrong dates through the help of Excel and this in the format..
where DtCadastro = '1162-02-26'
– Marco Souza
@Gypsy .
DtCadastro date
– Marco Souza
You can change the table, for example by adding columns?
– Leonel Sanches da Silva
@Ciganomorrisonmendez , adding columns yes , just could not change the type of this column
– Marco Souza