msdb

External Article

SQL Server user defined function to convert MSDB integer value to time value

  • Article

In a recent tip I outlined a process for converting a date, stored as an integer into a datetime data type. Date and time information for run history of SQL Server Agent jobs is stored within the msdb..sysjobshistory table as an integer data type, not as a datetime as one would expect. As promised, this tip picks up where we left off. On converting the integer-typed run_time into a format that is more user friendly for presentation purposes.

2009-05-20

2,522 reads

Blogs

Migrate to Azure PostgreSQL Flexible Server

By

I need to migrate from a single server to a flex server. Instead of...

Using Copilot to help me update SQL Saturday

By

An interesting AI experiment here with Copilot from GitHub in handling some code I...

Master SQL with This Free Course (141 Interactive Exercises Included)

By

SQL is essential for modern businesses and applications that rely on data. It's a...

Read the latest Blogs

Forums

The Vast Expansions of Hardware

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Vast Expansions of Hardware

Code Blocks

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Code Blocks

does netsuite really hide columns from customers?

By stan

Hi we built a gateway from sql server to netsuite using an oracle competitor's...

Visit the forum

Question of the Day

Code Blocks

What happens with this code:

DECLARE @Iteration INT = 0;

WHILE @Iteration < 10
    SELECT CustomerName,
        CustomerStatus
    FROM dbo.Customer
    WHERE CustomerID > 3;

    SET @Iteration += 1;

See possible answers