sql datepart time code example
Example 1: datepart day of week
SELECT DATENAME(DW,'2007-10-30');
Example 2: get time component of datetime sql
SELECT convert(varchar(8), getdate(), 108)
SELECT DATENAME(DW,'2007-10-30');
SELECT convert(varchar(8), getdate(), 108)