转换时间误差 [英] converting time error
本文介绍了转换时间误差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
尝试转换时间格式时出现错误
10:35:22:123
这是我的代码
字符串时间= DateTime.Now.ToString("hh:mm:ss:fff");
在此先感谢!
Hi all,
I am having error when trying to convert format of time
10:35:22:123
here is my code
string time = DateTime.Now.ToString("hh:mm:ss:fff");
Thanks in advance!!!
推荐答案
您好,在ss:fff
替换:冒号. />
Hi there replace : colon with . inss:fff
string time = DateTime.Now.ToString("hh:mm:ss.fff");
最好的问候,
爱德华
Best regards,
Eduard
这篇关于转换时间误差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文