Home Forums SQL Server 2005 T-SQL (SS2K5) DBO.SysJobHistory, how do you get the Job Time? RE: DBO.SysJobHistory, how do you get the Job Time?
Lynn Pettis
SSC Guru
Points: 442467
More actions
May 2, 2014 at 7:06 am
#1710326
Instead of all the conversions you could use the scalar function msdb.dbo.agent_datetime.
For example:
declare @rundate int, @runtime int;
set @rundate = 20140502;
set @runtime = 512;
select msdb.dbo.agent_datetime(@rundate,@runtime);