|
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 by 100.0:
SELECT minutes....
The remaining minutes, you want to either take the total minutes mod 60 or the difference between the total minutes and hours times 60.
|
|
Minutes to Fame I or Minutes to Fame II? Honestly, as of now, I prefer Minutes to Fame I, but I guess it's too early in the series to make a choice. Miriam and Sammy are definitely not as professional and funny as Joey and Hacken, but they are okay. The...
Started by yayitzmonica on
, 22 posts
by 17 people.
Answer Snippets (Read the full thread at popularasians):
Minutes....
Minutes to Fame II, the one airing now, is also if you win.
Actually, it is Minutes to Fame II because Minutes to Fame I did have two parts, but it was still Minutes to Fame I; they had the same hosts.
And joey....
|
|
So basically I have this relatively long stored procedure. The basic execution flow is that it SELECTS INTO some data into temp tables declared with he # sign and then runs a cursor through these tables a generate a 'running total' into a third temp table...
Started by Daud on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
You might find when running in SSMS it keeps....
When you run it through your app the temp table is deleted and recreated .
This temp table holds the data for that database session .
I would suggest the issue is related to the type of temp table (the # prefix) .
|
Ask your Facebook Friends
|
Overall goal: User enters some number in minutes and I change those numbers from minutes to some usable form in a calculation.
How do I convert the user input in the form of minutes to some number or value that I can use later on in this php script?
&...
Started by Newb on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you use the $minutes variable in a calculation....
Minutes are already a usable form of number for a calculation.
Seconds to do any computation ? When you are done you can convert again from seconds to minutes and display your results.
|
|
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 be subtracting
(_minutes % _nearest) * interval '1 minute'
or adding
(_nearest - (_minutes % _nearest....
Like a quarter hour, I'm way off here.
|
|
How to convert the time 11:21:21 into total minutes?
Started by Jibu P C on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Value using the TimeOfDay method, then use the TotalMinutes method to get the time in minutes:
DateTime t = new DateTime(0, 0, 0, 11, 21, 21); double minutes = t.TimeOfDay.TotalMinutes;
The minutes variable now contains 681.35 .
|
|
How would one automatically shutdown an ubuntu OS 30 minutes after it was turned on? Or 15 minutes after it was turned on? Etc?
I tried creating an init.d script like so:
shutdown -h +5
But my box does not shut down after 5 minutes.
Started by darkAsPitch on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
|
|
Can I shorten this function?
$mins = $secs - time('u'); function minutes($seconds){ return sprintf( "%2.2dm %2.2ds", floor($seconds/60),$seconds%60);} $mins_left = minutes($mins); echo "Resets in $mins_left.";
Started by Joey on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The function....
If you want to shorten up your whole code, than you could remove minutes at all could handle it as a macro ...
Can I shorten this function?
If for function you're meaning function minutes($seconds) , well, I think you can't.
|
|
I need to keep a session alive for 30 minutes and then kill it.
Started by Tom on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
E.g.:
$_SESSION['example'] = array('foo' => 'bar', 'registered' =....
Is this to log the user out after a set time? Setting the session creation time (or an expiry time) when it is registered, and then checking that on each page load could handle that .
|
|
How can I always get a reminder after 20 minutes since the computer was started?
Started by Jitendra vyas on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
Pause
Then you can have Window's....
Schedule it using the Scheduled Task a reminder 20 minutes after logging on:
WScript.Sleep 12 WScript.Echo "That was hard"
Write these lines.
Write a script that waits 20 minutes then shows a message box.
|