Converting time and duration

  • How do I convert SysJobHistory to time and duration to meaningful numbers?

     

    select nsj.name, nsjs.step_name, nsjs.run_date, nsjs.run_duration

      from msdb..sysjobs nsj join msdb..sysjobhistory nsjs on nsj.job_id = nsjs.job_id

    where name in ('Job Name') and nsjs.step_name not in ('(Job outcome)')

    and run_date > 'YYYYMMDD' and run_duration > 100

    order by step_name, run_date desc

     

  • does

    convert ( datetime, convert( varchar(8), nsjs.run_date) , 12)

    this help?

    Also run duration is in HHMMSS ie 125 means 1 Min 25 sec

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply