没有时间以正确的格式 [英] not getting time in proper format
本文介绍了没有时间以正确的格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
regDate = Convert.ToDateTime(DateTime.Today.ToString()).ToString("yyyy/MM/dd hh:mm:ss");
但是这里没有时间以正确的格式
/* 2008-08-01 20:35:45 yyyy-MM-dd hh:mm:ss */
but here not getting time in proper format
/*2008-08-01 20:35:45 yyyy-MM-dd hh:mm:ss*/
推荐答案
试试这个:
Hi,
Try this:
string regDate = DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss");
一切顺利.
all the best.
您应该这样做:
You should be doing :
string regDate = DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss");
这篇关于没有时间以正确的格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文