Declare @theMinutes int
Set @theMinutes = 2147483647
Select convert(varchar(15), @theMinutes / 1440 ) +' Days'
+ ' ' + REPLICATE('0', 2 - DATALENGTH(convert(varchar(2), (@theMinutes % 1440) / 60 ))) + convert(varchar(2), (@theMinutes % 1440) / 60 ) + ' Hours '
+ ' ' + REPLICATE('0', 2 - DATALENGTH(convert(varchar(2), (@theMinutes % 60)))) + convert(varchar(2), (@theMinutes % 60)) + ' Minutes 'as Days_Hours_Minutes
No comments:
Post a Comment