Type "Time" in SQL Server and C#
try using the below date formatter in C#.
DateTime dateTime = DateTime.Now;string text = dateTime.ToString("yyyy'-'MM'-'dd HH':'mm':'ss.fff");
This will lead to the same format as sql date format 'yyyy-mm-dd hh:mm:ss.fff'
Thanks!