sql get weekday code example
Example 1: how to get weekday from old date in sql
select format(columnName, 'dddd') as WeekDay from tableName; -- SQL Server 17
Example 2: get week day from date in sql
SELECT TO_CHAR(your_table.date_colunm, 'DAY')
FROM your_table;
Example 3: extract weekday from date in sql
SELECT WEEKDAY(date);