解决方案 Marty, 这是一种可能适合你的方式: Dim dt As DateTime =现在 MsgBox(dt.TimeOfDay.TotalSeconds) Kerry Moorman " Marty"写道: 嗨 如何获得当天的总秒数? 我认为这有助于( DateTime.Now.Second),但它只返回当前分钟的秒数。 关于 Marty 很好, 谢谢你, Marty Kerry Moorman写道: Marty, 这是一种可能适合你的方式: Dim dt As DateTime =现在 MsgBox (dt.TimeOfDay.TotalSeconds) Kerry Moorman " Marty"写道: 嗨 如何获得当天的总秒数? 我认为这有助于(DateTime.Now.Second),但它只返回当前分钟内的nb秒。 关注 Marty " Marty" < XM ****** @ hotmail.com> schrieb:如何获得当天的总秒数? \\\ Dim d As Double = Now()。TimeOfDay.TotalSeconds /// - MS Herfried K 。瓦格纳 MVP< URL:http://dotnet.mvps.org/> VB< URL:http://classicvb.org/petition/ > HiHow can I get the total seconds in the current day?I thaught that this was helping (DateTime.Now.Second), but it returnonly the nb of sec in the current minute.RegardsMarty 解决方案 Marty,Here is one way that might work for you:Dim dt As DateTime = NowMsgBox(dt.TimeOfDay.TotalSeconds)Kerry Moorman"Marty" wrote: Hi How can I get the total seconds in the current day? I thaught that this was helping (DateTime.Now.Second), but it return only the nb of sec in the current minute. Regards MartyGreat,thank you,MartyKerry Moorman wrote: Marty, Here is one way that might work for you: Dim dt As DateTime = Now MsgBox(dt.TimeOfDay.TotalSeconds) Kerry Moorman "Marty" wrote:HiHow can I get the total seconds in the current day?I thaught that this was helping (DateTime.Now.Second), but it returnonly the nb of sec in the current minute.RegardsMarty"Marty" <xm******@hotmail.com> schrieb: How can I get the total seconds in the current day?\\\Dim d As Double = Now().TimeOfDay.TotalSeconds///--M S Herfried K. WagnerM V P <URL:http://dotnet.mvps.org/>V B <URL:http://classicvb.org/petition/> 这篇关于一天中的总秒数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-09 10:06