|
Is there a clean and simple method of formatting an integer which is a count of a whole number of minutes into a decimal represnetation of hours and minutes. It's a great shame that there is not such thing as a timespan in T-SQL to support this.
Just ...
Answer Snippets (Read the full thread at stackoverflow):
To make the remainder appear to the right of the decimal place, divide the remaining minutes, you want to either take the total minutes mod 60 or the difference between the total by 100.0:
SELECT....
minutes and hours times 60.
|
|
I have some number of miles and a speed in MPH that I have converted into the number of hours it takes to travel that distance at that speed. Now I need to convert this decimal number into hours, minutes, and seconds. How do I do this? My best guess right...
Started by Jared on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Time = distance / speed; int hours = time; double minutesRemainder = (time - hours) * 60; int minutes = minutesRemainder; double secondsRemainder = (minutesRemainder - minutes) * 60; int seconds that back into hours/minutes/seconds....
|
|
I add up the time of produce a product. However, I divided the second into minutes without any problem.
120 sec.
=A1/60
But I want to convert the minute to HH:MM not decimal. How do I do that?
160 mins
=160/60 =2.66 mins
how to convert to decimal time...
Started by ponchee on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at apple):
DURATION
(weeks, days, hours, minutes, seconds, milliseconds)
So, you don't need to do the division....
The DURATION function combines separate values for weeks, days, hours, minutes, seconds, and milliseconds and returns a duration value.
|
Ask your Facebook Friends
|
How do you convert a decimal number to mixed radix notation?
I guess that given an input of an array of each of the bases, and the decimal number, it should output an array of the values of each column.
Started by nickf on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
), 5(7), 7(24), 45(60), 15(60), 500(1000) and you want this converted to decimal:
Take number n %= placeValues[v]; } console.log(output); // [97, 52, 8, 15, 3] --> 3 days, 15 hours, 8 minutes.
|
|
What i need to do, is have two defined strings that is inputted by the user,
string in = "9:35"; //am string out = "11:55"; //am
and i need to subtract them, so that would get the total hours that they were signed in. which should equal:
string total ...
Started by Xavier on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
How about TimeSpan(11, 55, 0); //or TimeSpan.Parse....
Those will be the minutes, so just add them to the hours.
Take the remainder of the decimal and multiply by 60, then round.
Wanted to go back, you'd just need to do a little bit of math .
|
|
I have an hour field in a database like 1.4, 1.5, 1.7 that I need to convert back to HH:MM. What is the easiest way to do this?
Started by Tony Borf on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
To get the minutes figure, subtract the whole number portion so you only have the amount after the decimal, then multiply the fraction by 60 to get the minutes....
The HH (hour) figure is the number before the decimal.
To the console.
|
|
On Tue, 5 May 2009 17:12:01 -0700, ChasSquirrel <ChasSquirrel@discussions.microsoft.com
I work on the phone and get paid per minute. I keep track of my calls in a
spreadsheet. I have the cell format set to [mm]:ss so it still shows minutes
even...
Started by ChasSquirrel on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at omgili):
So, to get from [mm]:ss to decimal minutes, multiply your min in it, then enter the following formula in
B1 to calculate decimal minutes:
=A1*24*60 dates and times as number....
In XL as a
decimal/fraction of a day.
|
|
How I can round to nearest X minutes?
Here's my attempt:
DECLARE _stamp ALIAS FOR $1; -- timestamp _nearest ALIAS FOR $2; -- minutes (integer) _minutes decimal; _ret timestamp; BEGIN _ret := date_trunc('minute', _stamp); SELECT EXTRACT (minute FROM _ret...
Started by raspi on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Instead of adding or subtracting
_minutes * interval '1 minute'
you should ....
Like a quarter hour, I'm way off here.
ALIAS FOR $2; _seconds integer; _ret timestamp; _minutes decimal; _mod decimal; BEGIN _ret := date.
|
|
I have a question. I wanted to know if a database that keeps up with time in whole minutes, EX Shelia worked 1979 minutes how do you figure up how much hourly time this is. To me it seems quite simple to just divide these minutes by 60 and there you go...
Started by MarieNeedsHelp on
, 4 posts
by 2 people.
Answer Snippets (Read the full thread at onlineconversion):
0.01 7
Without knowing anything.
To the accuracy of your calculator, probably around 12 decimal places.
|
|
On Sat, 17 Jan 2009 13:07:01 -0800, Doc <Doc@discussions.microsoft.com
Is there a way to separate and use the numbers, to the left of and to the
right of the decimal point in a single cell?
I am trying to convert angles given in decimal form (i...
Started by Doc on
, 14 posts
by 4 people.
Answer Snippets (Read the full thread at omgili):
This assumes
that the 3 of completeness, you can use the following array
formula in 3 cells to return the degrees, minutes <MikeH@discussions.....
Will contain the degrees,
minutes, and seconds of the decimal degrees value in D5.
|