• Thank you

    USE msdbUSE msdb

    go
    made the trick.

    For make it easy to use I added after SELECT

    DECLARE @DateFrom char(8) = '20170723' -- Set your start day range

    DECLARE @DateTo char(8) = '20170725'-- Set your end day range

    By the way I have uncommented, edited and added to the GROUP BY

    sJobHis.run_time AS [Running_Time],

    sJobHis.run_duration AS [Running_Duration],

    But the result is unclear and not easy to understand. I mean the script is awesome but it doesn't show me the big picture:

    Wouldn't be easier to show date like 'yyyy/mm/dd' and time like 'hh/mm/ss'?
    Can you help me do that?