declare @t datetime set @t = '2008-01-29' select 'a' + ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

declare @t datetime

set @t = '2008-01-29'

select 'a' + 
cast (
case (datepart(day, @t)+ 6) / 7
when (datepart(day, @t + 28)+ 6) / 7 then @t + 28
when (datepart(day, @t + 35)+ 6) / 7 then @t + 35
else null end

as varchar(5))

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results