extract week number sql server code example Example: sql server week number datepart(wk, DateToParse)