Inserting C# datetime milliseconds into sql Server DateTime

  • Thread starter Thread starter tk042383
  • Start date Start date
T

tk042383

On a C# datetime value I am using ToString(format) to specify a format of
"d/M/yyyy H:mm:ss:ffff" in trying to insert the value including its
milliseconds precision into a sqlServer 2000 DateTime column. I get error
241: "Syntax error converting to datetime from character string".

How do I insert the datetime value into a DateTime column so that it will
include the milliseconds component?
 
Back
Top