Finding A Week in T-SQL :: Tip o' The Day
Recently I needed to identify a week within a T-SQL Query. First off I figured I would want to know what day it is, then I could easily figure out a week time frame. To verify what day you have selected, use the following code: IF DATENAME(weekday, ‘1/7/07’) = ‘Sunday’ BEGIN SELECT ‘Sunday’END ELSE SELECT... Continue reading