Convert DateTime with milliseconds to SQL DateTime
See the question and my original answer on StackOverflowSQL Documentation about this is here: Supported String Literal Formats for datetime
So you could use ISO8601 (example: 2004-05-23T14:25:10.487), because, as stated in the doc:
The advantage in using the ISO 8601 format is that it is an international standard with unambiguous specification. Also, this format is not affected by the SET DATEFORMAT or SET LANGUAGE setting.