c# ,vs2005, 当前时间

2024-12-11 23:56:26
推荐回答(4个)
回答1:

(DateTime.Now - new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day)).TotalSeconds

回答2:

秒数?

System.DateTime t = System.DateTime.Now();

回答3:

t是要什么类型啊,还是单纯的取出秒数?
如果是的话就是:

string s = DateTime.Now.ToString("ss");

回答4:

DateTime dt = DataTime.Now