Hello
You could try the following lines:
declare @day_number tinyint
select @cda_today=datepart(weekday, getdate())
if @cda_today<7
select @day_number=7+(@cda_today-7))+1
else
select @day_number=(7-(@cda_today))+1
The code that is shown above can be contained as a a...