How to left pad a string in T-SQL (SQL Server 2012)
If you want to left pad a string in T-SQL in Microsoft SQL Server 2012, you can use the format function: To get the current hour padded with, zeros use: declare @CurrentDateTime datetime = '2013-04-03…