Viewing 15 posts - 61 through 75 (of 2,458 total)
I would do something like this:
DECLARE @date DATETIME = getdate();
SELECT WeekStart = CAST(DATEADD(DAY,f.Dt+1, @date) AS date),
WeekEnd = CAST(DATEADD(DAY,f.Dt+8, @date) AS date)
FROM (VALUES(DATEPART(WEEKDAY,@date)-1)) AS w(Wd)
CROSS APPLY (VALUES(-IIF(w.Wd=0,7,w.Wd))) AS...
April 8, 2019 at 6:59 pm
March 7, 2019 at 7:50 pm
March 7, 2019 at 1:46 pm
February 25, 2019 at 3:32 pm
Super easy when using string functions (of course) but, for fun, I took a stab at this. It's a little harder when the number is not evenly divisible by 10...
February 19, 2019 at 7:47 am
Good article Steve. Succinct and informative.
February 19, 2019 at 7:01 am
This article is awesome! Thanks for putting it together.
February 14, 2019 at 2:32 pm
February 13, 2019 at 9:30 am
Good article and great topic. I'm a big fan of computed columns so it's nice to see a detailed article on the topic. I would warn, however, against using a...
February 12, 2019 at 8:07 am
lauri.pietarinen - Thursday, November 22, 2018 1:47 AM
Thanks for posting this Lauri. I just left you a longer...
February 11, 2019 at 12:32 pm
February 11, 2019 at 12:24 pm
Viewing 15 posts - 61 through 75 (of 2,458 total)