SQL Server 2008 is not doing what I expected with DateTime. It doesn\'t let me set DateTime variables, no matter what date format I use.
DateTime
Wh
The CONVERT function helps.Check this:
CONVERT
declare @erro_event_timestamp as Timestamp; set @erro_event_timestamp = CONVERT(Timestamp, '2020-07-06 05:19:44.380', 121);
The magic number 121 I found here: https://www.w3schools.com/SQL/func_sqlserver_convert.asp