2009年1月9日星期五

A time changes a problem

Assume present time is: 09:5
The time that I get with DateTime.Now.ToShortTimeString() is: 9: 05
But I want to show for 09:05 be in namely 9 in front have 0, how should be that done! Try with String.fromat()Try:

DateTime.Now.ToString(HH:mM);Upstairs solvingToString(yyyyMMddHHmmssfff)

Date divided second millisecond to haveDateTime.Now.ToString(H:mM);Thanked, solved. Add cent!

没有评论: