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

# Convert seconds to minutes and seconds

 P: n/a Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom Nov 19 '05 #1
7 Replies

 P: n/a How about a couple of operators instead? seconds \ 60 = minutes seconds Mod 60 = seconds -- HTH, Kevin Spencer Microsoft MVP ..Net Developer What You Seek Is What You Get. "tshad" wrote in message news:us**************@tk2msftngp13.phx.gbl... Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom Nov 19 '05 #2

 P: n/a Or dim t as new TimeSpan(0,0,135) t.Minutes t.Seconds Karl -- MY ASP.Net tutorials http://www.openmymind.net/ - New and Improved (yes, the popup is annoying) http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to come!) "Kevin Spencer" wrote in message news:eb**************@TK2MSFTNGP15.phx.gbl... How about a couple of operators instead? seconds \ 60 = minutes seconds Mod 60 = seconds -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:us**************@tk2msftngp13.phx.gbl... Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom Nov 19 '05 #3

 P: n/a "Kevin Spencer" wrote in message news:eb**************@TK2MSFTNGP15.phx.gbl... How about a couple of operators instead? seconds \ 60 = minutes seconds Mod 60 = seconds That works fine. I was just interested to see if there was a function that did it as part of an object. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:us**************@tk2msftngp13.phx.gbl... Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom Nov 19 '05 #4

 P: n/a Yes. You would have to put the values into a DateTime object and use the ..Minutes and .Seconds properties. But my method is more efficient. -- HTH, Kevin Spencer Microsoft MVP ..Net Developer What You Seek Is What You Get. "tshad" wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" wrote in message news:eb**************@TK2MSFTNGP15.phx.gbl... How about a couple of operators instead? seconds \ 60 = minutes seconds Mod 60 = seconds That works fine. I was just interested to see if there was a function that did it as part of an object. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:us**************@tk2msftngp13.phx.gbl... Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom Nov 19 '05 #5

 P: n/a "Kevin Spencer" wrote in message news:uA**************@TK2MSFTNGP15.phx.gbl... Yes. You would have to put the values into a DateTime object and use the .Minutes and .Seconds properties. But my method is more efficient. I agree. Since there isn't much to it (I also put a Cint around the minutes calculation), there is really no reason to set up a separate object to handle it. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" wrote in message news:eb**************@TK2MSFTNGP15.phx.gbl... How about a couple of operators instead? seconds \ 60 = minutes seconds Mod 60 = seconds That works fine. I was just interested to see if there was a function that did it as part of an object. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:us**************@tk2msftngp13.phx.gbl... Is there a quick function in vb out there that will convert seconds to minutes and seconds? Thanks, Tom Nov 19 '05 #6

 P: n/a > Since there isn't much to it (I also put a Cint around the minutes calculation), there is really no reason to set up a separate object to handle it. No need for a CInt around anything. The VB.Net "\" operator returns an integer. -- HTH, Kevin Spencer Microsoft MVP ..Net Developer What You Seek Is What You Get. "tshad" wrote in message news:ur**************@tk2msftngp13.phx.gbl... "Kevin Spencer" wrote in message news:uA**************@TK2MSFTNGP15.phx.gbl... Yes. You would have to put the values into a DateTime object and use the .Minutes and .Seconds properties. But my method is more efficient. I agree. Since there isn't much to it (I also put a Cint around the minutes calculation), there is really no reason to set up a separate object to handle it. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" wrote in message news:eb**************@TK2MSFTNGP15.phx.gbl... How about a couple of operators instead? seconds \ 60 = minutes seconds Mod 60 = seconds That works fine. I was just interested to see if there was a function that did it as part of an object. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:us**************@tk2msftngp13.phx.gbl...> Is there a quick function in vb out there that will convert seconds to> minutes and seconds?>> Thanks,>> Tom> Nov 19 '05 #7

 P: n/a "Kevin Spencer" wrote in message news:%2*****************@TK2MSFTNGP09.phx.gbl... Since there isn't much to it (I also put a Cint around the minutes calculation), there is really no reason to set up a separate object to handle it. No need for a CInt around anything. The VB.Net "\" operator returns an integer. I didn't know about that one. You're right. It works fine that way. I just automatically used "/". Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:ur**************@tk2msftngp13.phx.gbl... "Kevin Spencer" wrote in message news:uA**************@TK2MSFTNGP15.phx.gbl... Yes. You would have to put the values into a DateTime object and use the .Minutes and .Seconds properties. But my method is more efficient. I agree. Since there isn't much to it (I also put a Cint around the minutes calculation), there is really no reason to set up a separate object to handle it. Thanks, Tom -- HTH, Kevin Spencer Microsoft MVP .Net Developer What You Seek Is What You Get. "tshad" wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" wrote in message news:eb**************@TK2MSFTNGP15.phx.gbl...> How about a couple of operators instead?>> seconds \ 60 = minutes> seconds Mod 60 = seconds That works fine. I was just interested to see if there was a function that did it as part of an object. Thanks, Tom>> --> HTH,>> Kevin Spencer> Microsoft MVP> .Net Developer> What You Seek Is What You Get.>> "tshad" wrote in message> news:us**************@tk2msftngp13.phx.gbl...>> Is there a quick function in vb out there that will convert seconds>> to minutes and seconds?>>>> Thanks,>>>> Tom>>>> Nov 19 '05 #8

### This discussion thread is closed

Replies have been disabled for this discussion.