455,556 Members | 1,506 Online
Need help? Post your question and get tips & solutions from a community of 455,556 IT Pros & Developers. It's quick & easy.

# Total seconds of day

 P: n/a 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 Marty Nov 21 '05 #1
12 Replies

 P: n/a Marty, Here is one way that might work for you: Dim dt As DateTime = Now MsgBox(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 Marty Nov 21 '05 #2

 P: n/a Great, thank you, Marty Kerry 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 Nov 21 '05 #3

 P: n/a "Marty" schrieb: How can I get the total seconds in the current day? \\\ Dim d As Double = Now().TimeOfDay.TotalSeconds /// -- M S Herfried K. Wagner M V P V B Nov 21 '05 #4

 P: n/a Herfried, Kerry already answered the question the same as you, but you used double instead. Still the same solution though You should really read the previous post before answering because I have seen you have answered using the same code in many posts in this newsgroup previously. Crouchie1998 BA (HONS) MCP MCSE Nov 21 '05 #5

 P: n/a Be fair, Crouchie1998. What about having a go at Marina for responding, half an hour later, to the 'Imposing a delay in code execution' thread with the (to all intents and purposes) same answer as Herfried did. I think it is rather obvious that depending on what 'feed' a given person is using, some see 'new posts' sooner or later than others, and not all 'new posts' are available to a person at the time they write a response. Remember, that there are a lot of factors that dictate how 'instantaneous' the feed to and from any given NNTP server or newsgroup is. "Crouchie1998" wrote in message news:OL**************@tk2msftngp13.phx.gbl... Herfried, Kerry already answered the question the same as you, but you used double instead. Still the same solution though You should really read the previous post before answering because I have seen you have answered using the same code in many posts in this newsgroup previously. Crouchie1998 BA (HONS) MCP MCSE Nov 21 '05 #6

 P: n/a Crouchie1998 wrote: You should really read the previous post before answering because I have seen you have answered using the same code in many posts in this newsgroup previously. Yeah Herfried, stop being so darned helpful! ;-) (I personally appreciate all of your posts, so please don't stop posting them). -- (O) e n o n e Nov 21 '05 #7

 P: n/a When it comes to questions, there are lots. When it comes to Questions, there are very few. Thanks Herfried for all your answers and DON't STOP as you are an extremely valuable asset to this news group. "Herfried K. Wagner [MVP]" wrote: "Marty" schrieb: How can I get the total seconds in the current day? \\\ Dim d As Double = Now().TimeOfDay.TotalSeconds /// -- M S Herfried K. Wagner M V P V B Nov 21 '05 #8

 P: n/a Marty, How can I get the total seconds in the current day? dim totalseconds as double = 24 * 60 * 60 I hope this helps, Cor Nov 21 '05 #9

 P: n/a You'll get growled at :) "Cor Ligthert" wrote in message news:OO**************@TK2MSFTNGP12.phx.gbl... Marty, How can I get the total seconds in the current day? dim totalseconds as double = 24 * 60 * 60 I hope this helps, Cor Nov 21 '05 #10

 P: n/a Cor, "Cor Ligthert" schrieb: How can I get the total seconds in the current day? dim totalseconds as double = 24 * 60 * 60 LOL -- I thought about giving this answer too :-). -- M S Herfried K. Wagner M V P V B Nov 21 '05 #11

 P: n/a Grouchie, Your post makes you seem like a shithead. "Crouchie1998" wrote in message news:OL**************@tk2msftngp13.phx.gbl... Herfried, Kerry already answered the question the same as you, but you used double instead. Still the same solution though You should really read the previous post before answering because I have seen you have answered using the same code in many posts in this newsgroup previously. Crouchie1998 BA (HONS) MCP MCSE Nov 21 '05 #12

 P: n/a lol :) Herfried K. Wagner [MVP] wrote: Cor, "Cor Ligthert" schrieb: How can I get the total seconds in the current day? dim totalseconds as double = 24 * 60 * 60 LOL -- I thought about giving this answer too :-). Nov 21 '05 #13

### This discussion thread is closed

Replies have been disabled for this discussion.