Last active
May 19, 2022 08:50
-
-
Save Otterpohl/840555339c32764c0e5a4d9b2eeb4b41 to your computer and use it in GitHub Desktop.
Gets the Agent Job Run duration without silly date and time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT run_duration | |
,msdb.dbo.agent_datetime(run_date, run_time) AS datetime | |
FROM msdb.dbo.sysjobhistory | |
WHERE step_name = 'Enter Job Step Name Here' | |
ORDER BY msdb.dbo.agent_datetime(run_date, run_time) ASC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment