September 10, 2009 at 3:34 pm
Comments posted to this topic are about the item Backup & Restoration Script
September 16, 2009 at 10:25 am
Your elapsed minutes calculation is wrong (plug in an elapsed time exceeding 1 hour to see). Change old to new as shown below
--old
--cast(datediff(ss,BS.backup_start_date,BS.backup_finish_date)/60 as varchar(10))
--new
cast((datediff(ss,BS.backup_start_date,BS.backup_finish_date)/60) - (datediff(ss,BS.backup_start_date,BS.backup_finish_date)/3600) * 60 as varchar(10))
July 1, 2010 at 12:17 pm
The following formats the duration in HH:MI:SS.
CONVERT( VARCHAR(8), DATEADD( SECOND, DATEDIFF( second, s.backup_start_date, s.backup_finish_date ), 0 ), 114 )
May 12, 2016 at 7:43 am
Thanks for the script.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply