get day of the week from date sql code example Example: datepart day of week SELECT DATENAME(DW,'2007-10-30');