Is there a quick function in vb out there that will convert seconds to
minutes and seconds?
Thanks,
Tom 7 2683
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" <ts**********@ftsolutions.com> 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
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" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> 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
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> 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
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" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> 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
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> 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
> 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" <ts**********@ftsolutions.com> wrote in message
news:ur**************@tk2msftngp13.phx.gbl... "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> 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 >
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> wrote in message news:ur**************@tk2msftngp13.phx.gbl... "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> 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" <ts**********@ftsolutions.com> 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 >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rudi Groenewald |
last post by:
Hi all.
If I've got a query which has a field with seconds in it... how will I use
the Convert function to get my field converted to the format: HH:MM:SS ?
The field with the seconds in is...
|
by: fred14214 |
last post by:
I need to be able to enter an elapsed time into a text
field. This time then needs to be converted into seconds
and stored in a field in some table.
The user will enter a time (format is...
|
by: Chris |
last post by:
Hi,
Can someone convert this to VB.NET Please. I am trying but for some reason
it doesn't work.
if (null != Request.QueryString)
{
secondsToWait = Request.QueryString;
if...
|
by: 00_CP_D12 |
last post by:
Is there an easy way in ASP.NET to convert seconds to Hours: Minutes:
Seconds?
For example, 65 seconds will return 0 hr, 1 min, 5 secs.
Thanks...
|
by: Jan |
last post by:
Hi:
I have an Access database that's been running (in one form or another)
for a couple of different clients for a few years. Now a new client has
requested that it be implemented with a SQL...
|
by: bakxchaixDD |
last post by:
I DON'T GET THIS
project:
Many treadmills output the speed in miles per hour. However, most runners think of their pace in minutes and seconds per mile. Write a program that inputs a decimal...
|
by: jimmy1 |
last post by:
Hello everyone I am trying to find a way to convert seconds to minutes in the script below -
Private Sub cmdBegin_Click()
On Error Resume Next
n = Val(txttime.Text) * 60
tmrClock.Enabled = True...
|
by: =?Utf-8?B?U2hlbGRvbg==?= |
last post by:
Hello -
I have about ten integer values that each need to be converted to days,
hours, minutes and seconds. I can't seem to find a formula for same that
works. These integer values come from a...
|
by: =?Utf-8?B?U2hlbGRvbg==?= |
last post by:
Hello -
I have various times formatted like 00:00:00, so for example, 01:32:05 would
be one thirty-two with five milliseconds.
I need to convert this into seconds (an integer).
First of...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |