• Something like the algorithms for obtaining datetime from sysjobhistory run date and run time:

    SELECT

    jh.run_date,

    jh.run_time,

    RunDateTime = x.RunDate + x.RunTime

    FROM msdb.dbo.sysjobhistory jh

    CROSS APPLY (

    SELECT

    RunDate = CAST(STR(jh.run_date, 8, 0) AS DATETIME),

    RunTime = CAST(STUFF(STUFF(RIGHT('00000'+CAST(jh.run_time AS VARCHAR(8)),6),3,0,':'),6,0,':') AS DATETIME)

    ) x

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden