Home Forums SQL Server 2008 SQL Server 2008 - General Display on Month and Year from date formula ?? RE: Display on Month and Year from date formula ??
ScottPletcher
SSC Guru
Points: 100950
More actions
February 18, 2013 at 2:07 pm
#1588964
declare @enddate datetime
set @enddate = getdate()
SELECT STUFF(CONVERT(varchar(10), DATEADD(DAY, -21, @enddate), 1), 3, 4, '')
SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.