Declare @Year varchar ='2013', @Month varchar ='7', @Day varchar ='1' Select Convert(Date, @Year+'-'+@Month +'-'+ @Day)-- Any Version SELECT DATEFROMPARTS(2012,7,1) -- For Sql Server 2012 and Above
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)