有没有什么办法可以在C#中创建类型时间以与SQL服务器的类型时间兼容?
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!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.