You haven't specified a format provider, so it's using the one from the current culture. If you always want to use :
, you should specify an appropriate provider, e.g.:
setting.SettingValue = dt.ToString("yyyy-MM-dd HH:mm:ss.fff",
CultureInfo.InvariantCulture);