strftime day of week code example
Example 1: datepart day of week
SELECT DATENAME(DW,'2007-10-30');
Example 2: day to week
var d = 1 // Amount of days
console.log(d/7) // Logs amount of weeks
SELECT DATENAME(DW,'2007-10-30');
var d = 1 // Amount of days
console.log(d/7) // Logs amount of weeks