Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: convert from MM/DD/YYYY to YYYYMMDD

    SELECT j.[name],

    s.step_name,

    h.step_id,

    h.step_name,

    h.run_date,

    h.run_time,

    h.sql_severity,

    h.message,

    h.server

    --yyymmdd -20120128

    ,CAST(h.run_date as int ) date_convert, convert(char(10),DATEADD(d, -7, GETDATE()),112) TARGET,h.run_status

    FROM msdb.dbo.sysjobhistory h

    INNER JOIN msdb.dbo.sysjobs j

    ON h.job_id = j.job_id

    INNER JOIN msdb.dbo.sysjobsteps s

    ON j.job_id = s.job_id

    AND...

  • RE: convert from MM/DD/YYYY to YYYYMMDD

    SELECT j.[name],

    s.step_name,

    h.step_id,

    h.step_name,

    h.run_date,

    h.run_time,

    h.sql_severity,

    h.message,

    h.server

    --yyymmdd -20120128

    ,CAST(h.run_date as int ) date_convert, convert(char(10),DATEADD(d, -7, GETDATE()),112) TARGET,h.run_status

    FROM msdb.dbo.sysjobhistory h

    INNER JOIN msdb.dbo.sysjobs j

    ON h.job_id = j.job_id

    INNER JOIN msdb.dbo.sysjobsteps s

    ON j.job_id = s.job_id

    AND...

  • RE: Date Format (mm/dd/yyyy hh:mm), no seconds or milliseconds

    For the format : -- MM/DD/YYYY HH:MMAM/PM

    CONVERT(VARCHAR(10), GETDATE(), 101) + ' ' + RIGHT(CONVERT(VARCHAR, GETDATE(), 100), 7)

  • RE: Logging Perfmon Counters to SQL 2005

    Great that works! - Givign permission on the C:\PerfLogs folder...

Viewing 4 posts - 1 through 4 (of 4 total)