run_time field in msdb

  • I need to compare the run_time field in sysjobhistory to getdate(). But I cannot figure out how to convert getdate() to the right value, or vice-versa.

    Does anyone have a way to do this?

    Thanks,

  • Try

    Select Top 5

    Run_Date,Run_Time,

    Convert(Int,Convert(char(8),Getdate(),112)),Convert(Int,Replace(Convert(char(8),getdate(),114),':',''))

    from msdb..sysjobhistory

  • Thanks a lot! I'll give it a try!

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

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