Click here to Skip to main content
15,895,283 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Which part of CMOS did they not understand? Pin
Ron Anders4-Oct-17 18:22
Ron Anders4-Oct-17 18:22 
GeneralRe: Which part of CMOS did they not understand? Pin
CodeWraith4-Oct-17 20:53
CodeWraith4-Oct-17 20:53 
GeneralRe: Which part of CMOS did they not understand? Pin
PIEBALDconsult5-Oct-17 16:24
mvePIEBALDconsult5-Oct-17 16:24 
GeneralSo there I was... PinPopular
#realJSOP4-Oct-17 6:52
mve#realJSOP4-Oct-17 6:52 
GeneralRe: So there I was... Pin
Ravi Bhavnani4-Oct-17 7:09
professionalRavi Bhavnani4-Oct-17 7:09 
GeneralRe: So there I was... Pin
#realJSOP4-Oct-17 7:34
mve#realJSOP4-Oct-17 7:34 
GeneralRe: So there I was... Pin
Ravi Bhavnani4-Oct-17 7:49
professionalRavi Bhavnani4-Oct-17 7:49 
GeneralRe: So there I was... PinPopular
Richard Deeming4-Oct-17 9:34
mveRichard Deeming4-Oct-17 9:34 
No need to mess around with strings:
C#
public static class ExtendTimeSpan
{
    public static TimeSpan ParseFromFormattedInt(int value)
    {
        int hours = Math.DivRem(value, 10000, out value);
        int minutes = Math.DivRem(value, 100, out value);
        int seconds = value + minutes * 60 + hours * 3600;
        return TimeSpan.FromSeconds(seconds);
    }
 
    public static TimeSpan ParseFromFormattedInt(this TimeSpan span, int value)
    {
        return ParseFromFormattedInt(value);
    }
}

Or, in SQL (2012 or later):
SQL
SELECT 
    TIMEFROMPARTS(active_end_time / 10000, (active_end_time / 100) % 100, active_end_time % 100, 0, 0)
FROM
    msdb.dbo.sysschedules
;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: So there I was... Pin
#realJSOP5-Oct-17 1:15
mve#realJSOP5-Oct-17 1:15 
GeneralRe: So there I was... Pin
#realJSOP5-Oct-17 2:33
mve#realJSOP5-Oct-17 2:33 
GeneralRe: So there I was... Pin
Richard Deeming5-Oct-17 3:39
mveRichard Deeming5-Oct-17 3:39 
GeneralRe: So there I was... Pin
Tim Carmichael4-Oct-17 7:27
Tim Carmichael4-Oct-17 7:27 
GeneralRe: So there I was... Pin
#realJSOP4-Oct-17 7:37
mve#realJSOP4-Oct-17 7:37 
GeneralRe: So there I was... Pin
Herbie Mountjoy11-Oct-17 2:51
professionalHerbie Mountjoy11-Oct-17 2:51 
GeneralRe: So there I was... Pin
OriginalGriff4-Oct-17 8:05
mveOriginalGriff4-Oct-17 8:05 
GeneralRe: So there I was... Pin
dandy724-Oct-17 8:14
dandy724-Oct-17 8:14 
GeneralRe: So there I was... Pin
Jim_Snyder5-Oct-17 3:27
professionalJim_Snyder5-Oct-17 3:27 
GeneralRe: So there I was... Pin
#realJSOP4-Oct-17 8:16
mve#realJSOP4-Oct-17 8:16 
GeneralRe: So there I was... Pin
Mike Winiberg4-Oct-17 20:22
professionalMike Winiberg4-Oct-17 20:22 
GeneralRe: So there I was... Pin
jsc424-Oct-17 22:49
professionaljsc424-Oct-17 22:49 
GeneralRe: So there I was... Pin
Mike Winiberg5-Oct-17 0:25
professionalMike Winiberg5-Oct-17 0:25 
GeneralRe: So there I was... Pin
Michael Martin5-Oct-17 0:59
professionalMichael Martin5-Oct-17 0:59 
GeneralRe: So there I was... Pin
User 84204-Oct-17 10:53
User 84204-Oct-17 10:53 
GeneralRe: So there I was... Pin
Jörgen Andersson4-Oct-17 19:42
professionalJörgen Andersson4-Oct-17 19:42 
GeneralRe: So there I was... Pin
Nicholas Marty5-Oct-17 1:05
professionalNicholas Marty5-Oct-17 1:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.