date conversion issue sql server 2005

Greens8301
Greens8301 used Ask the Experts™
on
select top 1
CONVERT(DATETIME, RTRIM(run_date)) +
                 (run_time * 9 + run_time % 10000 * 6 + run_time % 100 * 10  ) / 216e4
from msdb..sysjobhistory

Result
=====
2008-09-21 23:00:00.000

I like to get the format

2008-09-21 23:00

What can I change in the query would accomplish this

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Consultant
Top Expert 2009
Commented:
select top 1 CONVERT(VARCHAR(16),
CONVERT(DATETIME, RTRIM(run_date)) +
                 (run_time * 9 + run_time % 10000 * 6 + run_time % 100 * 10  ) / 216e4, 120)
from msdb..sysjobhistory

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial